|using @pre. operator. [message #655710]
||Tue, 22 February 2011 12:02
Registered: January 2011
Hello every experts ,|
I am writing a program in Java,using Eclipse for providing the user by the ability to apply some operators on a per developed UML Model of any software. one of this operators is to add a new Operation into an interface , so that all the related elements that interface has to be updated.
I need to use the @pre in the post conditions as you see in the following short code.:
String test="Dependency.allInstances()->select(getAppliedStereotypes().name- > includes('AddPhenomenon')).source.oclAsType(Interface).owned Member.oclAsType(Operation)- > forAll(op:Operation|Operation.allInstances()->select(name=op.name)- >size()=1)";
Constraint consTest=(Constraint)oclHelper.createInvariant(test); existsDepndency_AddPheno=ocl2.check(this.model, consTest);
The result is that : the @pre is to be used in the method post conditions, so how can I use it. where exactly I could embed the code of post conditions in the Java program?
Powered by FUDForum
. Page generated in 0.02391 seconds