- All Superinterfaces:
AbstractOVLType
public interface OVLClass extends AbstractOVLType
This interface represents OVLClass definitions in OVL programs.
- Since:
- Omix 1.3.11
- Author:
- Dr. Peter Droste, Omix Visualization
-
Method Summary
Modifier and Type Method Description boolean
constructorExists(String signature)
Determines if constructor exists in type definition.<T extends Annotation>
TgetAnnotation(Class<T> cls)
This method returns the annotation of this class identified by its class.Annotation[]
getAnnotations()
This method returns an array of all available annotations of this class.OVLConstructorDefinition
getConstructor(Class<?>... params)
Returns the constructor matching the given parameter types.List<String>
getConstructorNames()
Returns a list of names of all available constructors.List<? extends OVLConstructorDefinition>
getConstructors()
List of constructor definitions in the type definition.ClassType
getDeclaringClass()
Returns the declaring class if available.ClassType
getEnclosingClass()
Returns the enclosing class if available.String
getNamespace()
returns the namespace of the class.ClassType
getSuperClass()
The defined supertype of the classboolean
isAnnotationPresent(Class<? extends Annotation> a)
This method tests if the class is defined with a certain Java annotation.boolean
isAnonymousClass()
Determines if type is anonymous classboolean
isInterface()
Determines if type is interfaceboolean
isMemberClass()
Determines if type is memberclassOVLObject
newInstance()
This method creates an instance of the class without calling a constructor.Methods inherited from interface omix.plugin.ovl.AbstractOVLType
fieldExists, getFieldNames, getFields, getMethod, getMethodNames, getMethods, getName, getType, methodExists, program
-
Method Details
-
getSuperClass
ClassType getSuperClass()The defined supertype of the class- Returns:
- supertype
-
isInterface
boolean isInterface()Determines if type is interface- Returns:
- is interface?
-
isMemberClass
boolean isMemberClass()Determines if type is memberclass- Returns:
- is membertype?
- See Also:
ClassType.isMemberClass()
-
isAnonymousClass
boolean isAnonymousClass()Determines if type is anonymous class- Returns:
- is anonymous?
- See Also:
ClassType.isAnonymousClass()
-
getDeclaringClass
ClassType getDeclaringClass()Returns the declaring class if available.- Returns:
- declaring class or
null
- See Also:
ClassType.getDeclaringClass()
-
getEnclosingClass
ClassType getEnclosingClass()Returns the enclosing class if available.- Returns:
- enclosing class or
null
- See Also:
ClassType.getEnclosingClass()
-
isAnnotationPresent
This method tests if the class is defined with a certain Java annotation.- Parameters:
a
- the Java annotation- Returns:
- true if available
-
getAnnotation
This method returns the annotation of this class identified by its class.- Type Parameters:
T
- the type of the annotation- Parameters:
cls
- the class of the annotation- Returns:
- the annotation if available
-
getAnnotations
This method returns an array of all available annotations of this class.- Returns:
- list of annotations
-
newInstance
OVLObject newInstance()This method creates an instance of the class without calling a constructor.- Returns:
- plain object of the OVL defined class
-
getNamespace
String getNamespace()returns the namespace of the class.- Specified by:
getNamespace
in interfaceAbstractOVLType
- Returns:
- namespace
-
getConstructors
List<? extends OVLConstructorDefinition> getConstructors()List of constructor definitions in the type definition.- Returns:
- list of constructors
-
getConstructor
OVLConstructorDefinition getConstructor(Class<?>... params) throws NoSuchMethodException, IllegalAccessExceptionReturns the constructor matching the given parameter types.- Parameters:
params
- parameters of the constructor- Returns:
- reference object representing the constructor
- Throws:
IllegalAccessException
- if class or constructor are protectedNoSuchMethodException
- if constructor does not exist
-
getConstructorNames
Returns a list of names of all available constructors.- Returns:
- constructors
-
constructorExists
Determines if constructor exists in type definition.- Parameters:
signature
- of the method- Returns:
- exists?
-