|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.ucl.cs.emofocl.jmi.EMOFOCLUtilities
public class EMOFOCLUtilities
Constructor Summary | |
---|---|
EMOFOCLUtilities()
|
Method Summary | |
---|---|
static boolean |
conformsTo(Type type1,
Type type2)
|
static boolean |
conformsToTypeOf(Type type,
MultiplicityElement element)
|
static OCLCollection |
createElementCompatibleCollection(OCLCollection example,
CollectionKind kind)
|
static Type |
findOrCreatePrimitiveType(Specification specification,
OCLEquivalentKind kind)
|
static String |
formatEnumerationLiteral(EnumerationLiteral literal)
|
static String |
formatMOFPackagePath(MOFPackage mOFPackage)
|
static String |
formatMultiplicityOfElement(MultiplicityElement element)
|
static String |
formatNamedElement(NamedElement namedElement)
|
static String |
formatOperation(Operation operation)
Useful for describing an existing operation |
static String |
formatOperation(String name,
List argumentTypes)
Useful for reporting that a hypothetical operation does not exist |
static String |
formatOperation(Type owningType,
String name,
List argumentTypes)
Useful for reporting that a hypothetical operation does not exist |
static String |
formatPath(List path)
|
static String |
formatPathPrefix(int prefix,
List path)
|
static String |
formatProperty(Property property)
|
static String |
formatTypeOfElement(MultiplicityElement element)
|
static String |
formatTypePath(Type type)
|
static Type |
getBooleanType(Specification specification)
|
static javax.jmi.reflect.RefClass |
getClassProxyFromMetaElement(javax.jmi.reflect.RefPackage outermostPackageProxy,
MOFClass meta)
|
static CollectionType |
getCollectionType(Specification specification,
CollectionKind kind,
Type elementType)
|
static javax.jmi.reflect.RefEnum |
getEnumerationFromMetaElement(javax.jmi.reflect.RefPackage outermostPackageProxy,
Enumeration meta,
String literal)
|
static javax.jmi.reflect.RefEnum |
getEnumLiteralFromMetaElement(javax.jmi.reflect.RefPackage model,
EnumerationLiteral literal)
|
static Type |
getIntegerType(Specification specification)
|
static InvalidType |
getInvalidType(Specification specification)
|
static Type |
getOCLTypeFromMultiplicityElement(Specification specification,
MultiplicityElement element)
|
static javax.jmi.reflect.RefPackage |
getPackageFromMetaElement(javax.jmi.reflect.RefPackage outermostPackageProxy,
MOFPackage meta)
|
static Type |
getRealType(Specification specification)
|
static Specification |
getSpecification(NamedElement namedElement)
|
static Type |
getStringType(Specification specification)
|
static TupleType |
getTupleType(Specification specification,
List elementNames,
List elementTypes)
|
static VoidType |
getVoidType(Specification specification)
|
static boolean |
instanceOf(Object object,
Type type)
|
static boolean |
isBooleanType(Type type)
|
static boolean |
isCollectionType(Type type)
|
static boolean |
isInSpecification(Specification specification,
Type type)
|
static boolean |
isIntegerType(Type type)
|
static boolean |
isNumericType(Type type)
|
static boolean |
isRealType(Type type)
|
static boolean |
isStringType(Type type)
|
static boolean |
isWeakType(Type type)
VoidTypes and InvalidTypes are weak in the sense that they conform to any type. |
static NamedElement |
resolve(MOFPackage namespace,
List path)
Main resolution function. |
static Property |
resolveAttribute(MOFClass type,
String name)
|
static MOFPackage |
resolveNamespace(MOFPackage namespace,
List path)
Resolves all but the last element of the path specified: i.e. |
static Operation |
resolveOperation(MOFClass type,
String name,
List argumentTypes)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EMOFOCLUtilities()
Method Detail |
---|
public static javax.jmi.reflect.RefPackage getPackageFromMetaElement(javax.jmi.reflect.RefPackage outermostPackageProxy, MOFPackage meta)
public static javax.jmi.reflect.RefClass getClassProxyFromMetaElement(javax.jmi.reflect.RefPackage outermostPackageProxy, MOFClass meta)
public static javax.jmi.reflect.RefEnum getEnumerationFromMetaElement(javax.jmi.reflect.RefPackage outermostPackageProxy, Enumeration meta, String literal)
public static String formatOperation(String name, List argumentTypes)
name
- argumentTypes
-
public static String formatProperty(Property property)
public static String formatOperation(Type owningType, String name, List argumentTypes)
name
- argumentTypes
-
public static String formatOperation(Operation operation)
operation
-
public static String formatNamedElement(NamedElement namedElement)
public static String formatEnumerationLiteral(EnumerationLiteral literal)
literal
-
public static String formatTypeOfElement(MultiplicityElement element)
public static String formatMultiplicityOfElement(MultiplicityElement element)
public static String formatTypePath(Type type)
public static String formatMOFPackagePath(MOFPackage mOFPackage)
public static String formatPathPrefix(int prefix, List path)
public static String formatPath(List path)
public static Specification getSpecification(NamedElement namedElement)
public static NamedElement resolve(MOFPackage namespace, List path) throws ResolutionException
namespace
- path
-
ResolutionException
public static MOFPackage resolveNamespace(MOFPackage namespace, List path) throws ResolutionException
namespace
- pathCS
-
ResolutionException
public static Operation resolveOperation(MOFClass type, String name, List argumentTypes)
public static boolean conformsTo(Type type1, Type type2)
public static boolean conformsToTypeOf(Type type, MultiplicityElement element)
public static boolean instanceOf(Object object, Type type)
public static Property resolveAttribute(MOFClass type, String name)
public static boolean isInSpecification(Specification specification, Type type)
public static Type findOrCreatePrimitiveType(Specification specification, OCLEquivalentKind kind)
public static Type getBooleanType(Specification specification)
public static Type getIntegerType(Specification specification)
public static Type getRealType(Specification specification)
public static Type getStringType(Specification specification)
public static boolean isWeakType(Type type)
type
-
public static boolean isBooleanType(Type type)
public static boolean isNumericType(Type type)
public static boolean isIntegerType(Type type)
public static boolean isRealType(Type type)
public static boolean isStringType(Type type)
public static CollectionType getCollectionType(Specification specification, CollectionKind kind, Type elementType)
public static VoidType getVoidType(Specification specification)
public static InvalidType getInvalidType(Specification specification)
public static boolean isCollectionType(Type type)
public static TupleType getTupleType(Specification specification, List elementNames, List elementTypes)
public static Type getOCLTypeFromMultiplicityElement(Specification specification, MultiplicityElement element)
public static OCLCollection createElementCompatibleCollection(OCLCollection example, CollectionKind kind)
public static javax.jmi.reflect.RefEnum getEnumLiteralFromMetaElement(javax.jmi.reflect.RefPackage model, EnumerationLiteral literal)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |