From: Robert L. <rle...@us...> - 2007-02-16 13:34:28
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/parser/assembly/metamodel In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27808/src/ccmtools/parser/assembly/metamodel Modified Files: Constant.java Attribute.java Log Message: Java assemblies Index: Attribute.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/parser/assembly/metamodel/Attribute.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Attribute.java 12 Feb 2007 16:01:12 -0000 1.4 --- Attribute.java 16 Feb 2007 13:34:21 -0000 1.5 *************** *** 26,29 **** --- 26,43 ---- target_ = target; source_ = source; + if(target.getComponent()==null) + throw new RuntimeException("target must be an inner component"); + if(source.getComponent()!=null) + throw new RuntimeException("source must not be an inner component"); + } + + public Port getTarget() + { + return target_; + } + + public String getSource() + { + return source_.getConnector(); } Index: Constant.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/parser/assembly/metamodel/Constant.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Constant.java 12 Feb 2007 16:01:12 -0000 1.3 --- Constant.java 16 Feb 2007 13:34:21 -0000 1.4 *************** *** 26,29 **** --- 26,41 ---- target_ = target; value_ = value; + if(target.getComponent()==null) + throw new RuntimeException("target must be an inner component"); + } + + public Port getTarget() + { + return target_; + } + + public Value getValue() + { + return value_; } |