Package org.sblim.wbem.cim
Class CIMMethod
- java.lang.Object
-
- org.sblim.wbem.cim.CIMElement
-
- org.sblim.wbem.cim.CIMQualifiableElement
-
- org.sblim.wbem.cim.CIMMethod
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable
public class CIMMethod extends CIMQualifiableElement implements java.lang.Cloneable
This class is not thread safe.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.sblim.wbem.cim.CIMQualifiableElement
iQualifiers
-
Fields inherited from class org.sblim.wbem.cim.CIMElement
CLOSING_BRAKET, EMPTY, iName, OPENING_BRAKET
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addParameter(CIMParameter pParameter)
Adds a the specified parameter to the method.java.lang.Object
clone()
java.lang.Object
clone(boolean pIncludeQualifier, boolean pIncludeClassOrigin)
Returns an object which is a copy of this CIM Method.boolean
equals(java.lang.Object o)
java.lang.String
getOriginClass()
Get the name of the origin class for this method.java.lang.String
getOverridingMethod()
Gets the name of the overriding method for this method.java.util.Vector
getParameters()
Returns a list of CIMParameters for this method.int
getSize()
Returns the size of the value returned by the method described by the CIMDataType.CIMDataType
getType()
Returns the data type of the method.int
hashCode()
boolean
isPropagated()
Identify if the current method was propagated without modifications from the underlying subclass (respectively, Class).static void
main(java.lang.String[] args)
void
removeProperty(java.lang.String pParameterName)
Removes the specified property from the method.void
setOriginClass(java.lang.String pOriginClass)
Specifies the name of the class where this method was defined.void
setOverridingMethod(java.lang.String pOverridingMethod)
Set the name of the overriding method for this method.void
setParameters(java.util.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.java.lang.String
toMOF()
Returns the MOF representation of the method.java.lang.String
toString()
-
Methods inherited from class org.sblim.wbem.cim.CIMQualifiableElement
addQualifier, getQualifier, getQualifiers, removeQualifier, setQualifiers
-
Methods inherited from class org.sblim.wbem.cim.CIMElement
appendTab, assign, compareTo, getName, lessThan, setName, vectorToMOFString, vectorToMOFString, vectorToMOFString
-
-
-
-
Method Detail
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classjava.lang.Object
-
clone
public java.lang.Object clone(boolean pIncludeQualifier, boolean pIncludeClassOrigin)
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
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classCIMElement
-
getOriginClass
public java.lang.String getOriginClass()
Get the name of the origin class for this method.- Returns:
- the name of the origin class for this method.
-
getOverridingMethod
public java.lang.String getOverridingMethod()
Gets the name of the overriding method for this method.- Returns:
- the name of the overriding method.
-
getParameters
public java.util.Vector 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
public CIMDataType getType()
Returns the data type of the method.- Returns:
- null if the method data type is void
-
setOriginClass
public void setOriginClass(java.lang.String pOriginClass)
Specifies the name of the class where this method was defined.- Parameters:
pOriginClass
- name of the class where this method was defined.
-
setOverridingMethod
public void setOverridingMethod(java.lang.String pOverridingMethod)
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
public void addParameter(CIMParameter pParameter)
Adds a the specified parameter to the method.- Parameters:
pParameter
- specifies the parameter to be added.- Throws:
java.lang.IllegalArgumentException
- if the parameter is null
-
setParameters
public void setParameters(java.util.Vector pParameters)
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
public void removeProperty(java.lang.String pParameterName)
Removes the specified property from the method. Returns normally if the methods does not exists.- Parameters:
pParameterName
-- Throws:
java.lang.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:
java.lang.IllegalArgumentException
- if the specified size is not a valid size.
-
setType
public void setType(CIMDataType pType)
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
public java.lang.String toMOF()
Returns the MOF representation of the method.- Returns:
- a string representation in MOF
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
main
public static void main(java.lang.String[] args)
-
-