Package net.aifusion.metamodel
Class CimClass
java.lang.Object
net.aifusion.metamodel.QualifiedElement
net.aifusion.metamodel.NamedElement
net.aifusion.metamodel.CimStructure
net.aifusion.metamodel.CimClass
- All Implemented Interfaces:
CimEventGenerator
- Direct Known Subclasses:
CimInterface
Class to represent a CIM Class definition. A CIM Class can declare methods (operations) in addition to properties. Classes are
instantiated by CIM Instances. Classes are constructed by the
MOFParser
using MOF definitions.- Author:
- Sharad Singhal
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the names of all methods defined in this class, or its superTypesGet the CIM type of this elementGet the case-normalized (lower case) name for this elementGet the names of all methods defined in this classgetMethodOriginClass
(String methodOrPropertyName) Get the name of the class or interface where this property or method is definedgetMethodParameters
(String methodName) Get the parameters associated with a given methodgetMethodQualifiers
(String methodName) Get the qualifiers declared on a methodgetMethodQualifierValue
(String methodName, String qualifierName) Get the value of a method qualifier in this classgetMethodReturnType
(String methodName) Get the return type of a method defined in this classgetName()
Get the name of this elementgetReferencedClass
(String methodOrPropertyName) Get the name of the referenced class returned by the method or propertygetReferencedEnum
(String methodOrPropertyName) Get the Enumeration returned by the method or propertygetReferencedStructure
(String methodOrPropertyName) Get the Structure returned by the method or propertyint
hashCode()
boolean
Check if this class or one of its supertypes contains a given methodboolean
hasMethodQualifier
(String methodName, String qualifierName) Check if a given qualifier is declared on a methodinvokeMethod
(String methodName, List<CimParameter> cimParameters) Invoke a method on this instancetoMOF()
Return the MOF representation of this elementtoString()
Methods inherited from class net.aifusion.metamodel.CimStructure
getAllEnumerationNames, getAllInterfaceNames, getAllPropertyNames, getAllStructureNames, getDefaultPropertyValue, getEnumeration, getEnumerationNames, getInterface, getInterfaceNames, getPropertyNames, getPropertyOriginClass, getPropertyQualifiers, getPropertyQualifierValue, getPropertyType, getPropertyValue, getStructure, getStructureNames, hasEnumeration, hasKeys, hasProperty, hasPropertyQualifier, hasStructure, implementsInterface, setPropertyValue
Methods inherited from class net.aifusion.metamodel.NamedElement
addListener, getAllQualifiers, getFullName, getNameSpacePath, getObjectPath, getQualifierValue, getSuperType, hasListener, hasQualifier, isAbstract, isSubTypeOf, removeListener
Methods inherited from class net.aifusion.metamodel.QualifiedElement
getQualifiers
-
Method Details
-
getMethodNames
Get the names of all methods defined in this class- Returns:
- - set containing method names defined in this class
-
getAllMethodNames
Get the names of all methods defined in this class, or its superTypes- Returns:
- - names of all methods in this class or its superclass hierarchy
-
hasMethod
Check if this class or one of its supertypes contains a given method- Parameters:
methodName
- - name of the method to check- Returns:
- - true if the class contains a method with the given name, false otherwise
-
getMethodReturnType
Get the return type of a method defined in this class- Parameters:
methodName
- - name of the method desired- Returns:
- - data type returned by the method. Null if no such method exists
-
getMethodParameters
Get the parameters associated with a given method- Parameters:
methodName
- - name of the method desired- Returns:
- - list containing method parameters. Null if no such method defined
-
getMethodQualifiers
Get the qualifiers declared on a method- Parameters:
methodName
- - name of the method- Returns:
- - all qualifiers on the method. Empty if none declared
-
hasMethodQualifier
Check if a given qualifier is declared on a method- Parameters:
methodName
- - name of the methodqualifierName
- - name of the qualifier- Returns:
- - true if the method has the given qualifier, false otherwise
-
getMethodQualifierValue
Get the value of a method qualifier in this class- Parameters:
methodName
- - name of the methodqualifierName
- - name of the qualifier- Returns:
- - value of the qualifier
-
getMethodOriginClass
Get the name of the class or interface where this property or method is defined- Parameters:
methodOrPropertyName
- - name of the method- Returns:
- - name of the origin class. Null if no such property or method exists
-
getReferencedStructure
Get the Structure returned by the method or property- Overrides:
getReferencedStructure
in classCimStructure
- Parameters:
methodOrPropertyName
- - name of the method or property- Returns:
- - structure returned by method or property, null if the method or property does not return one
-
getReferencedEnum
Get the Enumeration returned by the method or property- Overrides:
getReferencedEnum
in classCimStructure
- Parameters:
methodOrPropertyName
- - name of the method or property- Returns:
- - Enumeration returned by method or property, null if the method or property does not return one
-
getReferencedClass
Get the name of the referenced class returned by the method or property- Overrides:
getReferencedClass
in classCimStructure
- Parameters:
methodOrPropertyName
- - name of the method or property- Returns:
- - referenced class returned by method or property, null if the method or property does not return one
-
invokeMethod
Invoke a method on this instance- Parameters:
methodName
- - name of the method to invokecimParameters
- - parameters required by the method- Returns:
- - returned value from the method
-
equals
- Overrides:
equals
in classCimStructure
-
getName
Get the name of this element- Returns:
- - name of this element
- See Also:
-
getLowerCaseName
Get the case-normalized (lower case) name for this element- Returns:
- - name of this element normalized to lower case
- See Also:
-
getElementType
Get the CIM type of this element- Returns:
- - CIMType for this element
- See Also:
-
toMOF
Return the MOF representation of this element- Returns:
- - String containing MOF representation of this element
-
toString
-
hashCode
public int hashCode()
-