Class CIMMethod<E>
java.lang.Object
javax.cim.CIMElement
javax.cim.CIMTypedElement
javax.cim.CIMMethod<E>
- Type Parameters:
E
- Type parameter.
- All Implemented Interfaces:
Serializable, Comparable<CIMElement>, CIMQualifiedElementInterface
-
Constructor Summary
ConstructorsConstructorDescriptionCIMMethod
(String pName, CIMDataType pType, CIMQualifier<?>[] pQualis, CIMParameter<?>[] pParams, boolean pPropagated, String pOriginClass) Constructs aCIMMethod
object with the specified information. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares this object against the specified object.filter
(boolean pIncludeQualifiers, boolean pIncludeClassOrigin) Returns aCIMMethod
filtered as specified.filter
(boolean pIncludeQualifiers, boolean pIncludeClassOrigin, boolean pLocalOnly) Returns aCIMMethod
filtered as specified.Returns the class name in which this method was defined or overridden.CIMParameter
<?> getParameter
(String pName) Get the parameter that matches the specified name.CIMParameter<?>[]
Returns an array of the parameters for this method.CIMQualifier
<?> getQualifier
(int pIndex) Get a qualifier by index.CIMQualifier
<?> getQualifier
(String pName) Gets a qualifier by name.int
Get the number of qualifiers defined for this CIM Method.CIMQualifier<?>[]
Returns the list of qualifiers for this class.getQualifierValue
(String pName) Gets a qualifier value by name.boolean
hasQualifier
(String pName) Checks whether the specified qualifier is one of the qualifiers in this CIM method.boolean
hasQualifierValue
(String pName, Object pValue) Checks whether the specified qualifier is one of the qualifiers defined for this method with the specified value.boolean
Determines if this method is Propagated.toString()
Returns aString
representation of theCIMMethod
.Methods inherited from class CIMTypedElement
getDataType, hashCode
Methods inherited from class CIMElement
compareTo, getName
-
Constructor Details
-
CIMMethod
public CIMMethod(String pName, CIMDataType pType, CIMQualifier<?>[] pQualis, CIMParameter<?>[] pParams, boolean pPropagated, String pOriginClass) Constructs aCIMMethod
object with the specified information.- Parameters:
pName
- The name of the method.pType
- The data type of the method.pQualis
- The method qualifiers.pParams
- The array of parameters for this method.pPropagated
- Is this method propagated from the superclass.pOriginClass
- The class this method was defined or overridden in.
-
-
Method Details
-
equals
Compares this object against the specified object. The result istrue
if and only if the argument is notnull
and is aCIMMethod
object that represents the same value as this object.- Overrides:
equals
in classCIMTypedElement
- Parameters:
pObj
- The object to compare.- Returns:
true
if the objects are the same;false
otherwise.
-
filter
Returns aCIMMethod
filtered as specified.- Parameters:
pIncludeQualifiers
- Iftrue
all qualifiers are returned; otherwise no qualifiers.pIncludeClassOrigin
- Iftrue
the class origin is included; otherwise no class origin is present.- Returns:
- A filtered
CIMMethod
.
-
filter
public CIMMethod<E> filter(boolean pIncludeQualifiers, boolean pIncludeClassOrigin, boolean pLocalOnly) Returns aCIMMethod
filtered as specified.- Parameters:
pIncludeQualifiers
- Iftrue
all qualifiers are returned; otherwise no qualifiers.pIncludeClassOrigin
- Iftrue
the class origin is included; otherwise no class origin is presentpLocalOnly
- Iftrue
only the qualifiers defined on this class are included; otherwise all qualifiers are included.- Returns:
- A filtered
CIMMethod
.
-
getOriginClass
Returns the class name in which this method was defined or overridden.- Returns:
- Name of class where this property was defined.
-
getParameter
Get the parameter that matches the specified name.- Parameters:
pName
- The name of theCIMParameter
to retrieve.- Returns:
CIMParameter
matching the name specified; otherwisenull
.
-
getParameters
Returns an array of the parameters for this method.- Returns:
- The parameters for this method.
-
getQualifier
Get a qualifier by index.- Specified by:
getQualifier
in interfaceCIMQualifiedElementInterface
- Parameters:
pIndex
- The index of the qualifier.- Returns:
- The Qualifier at index
pIndex
. - Throws:
ArrayIndexOutOfBoundsException
-
getQualifier
Gets a qualifier by name.- Specified by:
getQualifier
in interfaceCIMQualifiedElementInterface
- Parameters:
pName
- The name of the qualifier to get.- Returns:
null
if the qualifier does not exist, otherwise returns the reference to the qualifier.
-
getQualifierCount
public int getQualifierCount()Get the number of qualifiers defined for this CIM Method.- Specified by:
getQualifierCount
in interfaceCIMQualifiedElementInterface
- Returns:
- The number of qualifiers.
-
getQualifiers
Returns the list of qualifiers for this class.- Specified by:
getQualifiers
in interfaceCIMQualifiedElementInterface
- Returns:
- Qualifiers for this class.
-
getQualifierValue
Gets a qualifier value by name.- Specified by:
getQualifierValue
in interfaceCIMQualifiedElementInterface
- Parameters:
pName
- The name of the qualifier to get.- Returns:
null
if the qualifier does not exist or value isnull
, otherwise returns the reference to the qualifier.
-
hasQualifier
Checks whether the specified qualifier is one of the qualifiers in this CIM method.- Specified by:
hasQualifier
in interfaceCIMQualifiedElementInterface
- Parameters:
pName
- The name of the qualifier.- Returns:
true
if the qualifier exists in this CIM method, otherwisefalse
.
-
hasQualifierValue
Checks whether the specified qualifier is one of the qualifiers defined for this method with the specified value. This method will returnfalse
if the qualifier is not applied or if the value does not match.- Specified by:
hasQualifierValue
in interfaceCIMQualifiedElementInterface
- Parameters:
pName
- The name of the qualifier.pValue
- The value to be tested.- Returns:
true
if the qualifier exists and has this value, otherwise false.
-
isPropagated
public boolean isPropagated()Determines if this method is Propagated.- Returns:
true
if this method is propagated.
-
toString
Returns aString
representation of theCIMMethod
. This method is intended to be used only for debugging purposes, and the format of the returned string may vary between implementations. The returned string may be empty but may not benull
.- Overrides:
toString
in classCIMTypedElement
- Returns:
- The string representation of this method.
-