Returns the concatenation of the current string and the given object "any" (as a String).
Expression | Result |
---|---|
'times '.add(42) | 'times 42' |
Returns the concatenation of self (as a String) and the given string "s".
Expression | Result |
---|---|
42.add(' times') | '42 times' |
Indicates whether the object "o1" is a different object from the object "o2".
Expression | Result |
---|---|
'Hello'.differs('World') | true |
'Hello'.differs('Hello') | false |
Indicates whether the object "o1" is the same as the object "o2". For more information refer to the Object#equals(Object) method.
Expression | Result |
---|---|
'Hello'.equals('World') | false |
'Hello'.equals('Hello') | true |
Casts the current object to the given type.
Expression | Result |
---|---|
anEPackage.oclAsType(ecore::EPackage) | anEPackage |
anEPackage.oclAsType(ecore::EClass) | anEPackage |
Contrary to Acceleo 3, the type is ignored, the given object will be returned directly.
Language | Expression | Result |
---|---|---|
Acceleo 3 (MTL) | anEPackage.oclAsType(ecore::EPackage) | anEPackage |
Acceleo 3 (MTL) | anEPackage.oclAsType(ecore::EClass) | oclInvalid |
Evaluates to "true" if the type of the object o1 conforms to the type "classifier". That is, o1 is of type "classifier" or a subtype of "classifier".
Expression | Result |
---|---|
anEPackage.oclIsKindOf(ecore::EPackage) | true |
anEPackage.oclIsKindOf(ecore::ENamedElement) | true |
Evaluates to "true" if the object o1 if of the type "classifier" but not a subtype of the "classifier".
Expression | Result |
---|---|
anEPackage.oclIsTypeOf(ecore::EPackage) | true |
anEPackage.oclIsTypeOf(ecore::ENamedElement) | false |
Returns a string representation of the current object.
Expression | Result |
---|---|
42.toString() | '42' |
Returns a string representation of the current environment.
Expression | Result |
---|---|
42.trace() | 'Metamodels: http://www.eclipse.org/emf/2002/Ecore Services: org.eclipse.acceleo.query.services.AnyServices public java.lang.String org.eclipse.acceleo.query.services.AnyServices.add(java.lang.Object,java.lang.String) ... receiver: 42 ' |