Class CIMMethod
java.lang.Object
org.sblim.wbem.cim.CIMElement
org.sblim.wbem.cim.CIMQualifiableElement
org.sblim.wbem.cim.CIMMethod
- All Implemented Interfaces:
Serializable, Cloneable, Comparable
This class is not thread safe.
- See Also:
-
Field Summary
Fields inherited from class CIMQualifiableElement
iQualifiers
Fields inherited from class CIMElement
CLOSING_BRAKET, EMPTY, iName, OPENING_BRAKET
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addParameter
(CIMParameter pParameter) Adds a the specified parameter to the method.clone()
clone
(boolean pIncludeQualifier, boolean pIncludeClassOrigin) Returns an object which is a copy of this CIM Method.boolean
Get the name of the origin class for this method.Gets the name of the overriding method for this method.Returns a list of CIMParameters for this method.int
getSize()
Returns the size of the value returned by the method described by the CIMDataType.getType()
Returns the data type of the method.int
hashCode()
boolean
Identify if the current method was propagated without modifications from the underlying subclass (respectively, Class).static void
void
removeProperty
(String pParameterName) Removes the specified property from the method.void
setOriginClass
(String pOriginClass) Specifies the name of the class where this method was defined.void
setOverridingMethod
(String pOverridingMethod) Set the name of the overriding method for this method.void
setParameters
(Vector pParameters) Specify the new set of parameters for the method.void
setPropagated
(boolean pIsPropagated) Specifies if the current method is propagated from a parent class.void
setSize
(int pSize) Deprecated.the current method has been deprecated because the size of the data type is unmutable.void
setType
(CIMDataType pType) Sets the data type of the returned value for the method.toMOF()
Returns the MOF representation of the method.toString()
Methods inherited from class CIMQualifiableElement
addQualifier, getQualifier, getQualifiers, removeQualifier, setQualifiers
Methods inherited from class CIMElement
appendTab, assign, compareTo, getName, lessThan, setName, vectorToMOFString, vectorToMOFString, vectorToMOFString
-
Constructor Details
-
CIMMethod
public CIMMethod()Creates and instantiates a CIM method. -
CIMMethod
Creates and instantiates a CIM Method with the specified name.- Parameters:
name
- the name for the method.
-
-
Method Details
-
clone
-
clone
Returns an object which is a copy of this CIM Method.- Parameters:
pIncludeQualifier
- a boolean that is true if the new object must contain qualifier information from the current method, otherwise false.pIncludeClassOrigin
- a boolean that is true if the new object must contain classorigin information from the current method, otherwise false.- Returns:
- returns an object which is a copy of this CIMMethod
-
hashCode
-
equals
- Overrides:
equals
in classCIMElement
-
getOriginClass
Get the name of the origin class for this method.- Returns:
- the name of the origin class for this method.
-
getOverridingMethod
Gets the name of the overriding method for this method.- Returns:
- the name of the overriding method.
-
getParameters
Returns a list of CIMParameters for this method. For performance reasons the method returns a vector which provides direct access to the parameters of the method. It is important to note that any modification to this vector may affect the consistency of the CIMObject therefore, should be avoided. The application should deside when the vector needs to be cloned or not to preserve a consistent internal state.- Returns:
- a vector of CIMParameter for this method.
-
isPropagated
public boolean isPropagated()Identify if the current method was propagated without modifications from the underlying subclass (respectively, Class).- Returns:
- true if the method was propagated, false if it was not.
-
getSize
public int getSize()Returns the size of the value returned by the method described by the CIMDataType. For single data types elements, a SINGLE_SIZE is returned. For arrays data type elements, the size of the array is returned or SIZE_UNLIMITED if the array does not specify the size If the data type is not present, a SINGLE_SIZE is returned.- Returns:
- the size of the method described by the CIMDataType
-
getType
Returns the data type of the method.- Returns:
- null if the method data type is void
-
setOriginClass
Specifies the name of the class where this method was defined.- Parameters:
pOriginClass
- name of the class where this method was defined.
-
setOverridingMethod
Set the name of the overriding method for this method.- Parameters:
pOverridingMethod
- the name of the overriding method. A null parameter value is accepted.
-
addParameter
Adds a the specified parameter to the method.- Parameters:
pParameter
- specifies the parameter to be added.- Throws:
IllegalArgumentException
- if the parameter is null
-
setParameters
Specify the new set of parameters for the method. If parameters is null, all the parameters are removed from the method.- Parameters:
pParameters
- specifies a vector containing the new set of parameters
-
setPropagated
public void setPropagated(boolean pIsPropagated) Specifies if the current method is propagated from a parent class.- Parameters:
pIsPropagated
-
-
removeProperty
Removes the specified property from the method. Returns normally if the methods does not exists.- Parameters:
pParameterName
-- Throws:
IllegalArgumentException
- if the parameterName is null.
-
setSize
public void setSize(int pSize) Deprecated.the current method has been deprecated because the size of the data type is unmutable. To change the size of the return type, a new data type must be specified by invoking the setType methodSet the size of the type returned by the method.- Parameters:
pSize
- - the size assigned to the method's return type- Throws:
IllegalArgumentException
- if the specified size is not a valid size.
-
setType
Sets the data type of the returned value for the method. Setting the method type to null indicates that the method is void.- Parameters:
pType
- specifie the return value data type
-
toMOF
Returns the MOF representation of the method.- Returns:
- a string representation in MOF
-
toString
-
main
-