org.sblim.wbem.cim

Class CIMMethod

Implemented Interfaces:
Cloneable, Comparable, Serializable

public class CIMMethod
extends CIMQualifiableElement
implements Cloneable

This class is not thread safe.

Field Summary

Fields inherited from class org.sblim.wbem.cim.CIMQualifiableElement

iQualifiers

Fields inherited from class org.sblim.wbem.cim.CIMElement

CLOSING_BRAKET, EMPTY, OPENING_BRAKET, iName

Constructor Summary

CIMMethod()
Creates and instantiates a CIM method.
CIMMethod(String name)
Creates and instantiates a CIM Method with the specified name.

Method Summary

void
addParameter(CIMParameter pParameter)
Adds a the specified parameter to the method.
Object
clone()
Object
clone(boolean pIncludeQualifier, boolean pIncludeClassOrigin)
Returns an object which is a copy of this CIM Method.
boolean
equals(Object o)
String
getOriginClass()
Get the name of the origin class for this method.
String
getOverridingMethod()
Gets the name of the overriding method for this method.
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(String[] args)
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.
String
toMOF()
Returns the MOF representation of the method.
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, equals, getName, lessThan, setName, vectorToMOFString, vectorToMOFString, vectorToMOFString

Constructor Details

CIMMethod

public CIMMethod()
Creates and instantiates a CIM method.

CIMMethod

public CIMMethod(String name)
Creates and instantiates a CIM Method with the specified name.
Parameters:
name - the name for the method.

Method Details

addParameter

public void addParameter(CIMParameter pParameter)
Adds a the specified parameter to the method.
Parameters:
pParameter - specifies the parameter to be added.

clone

public Object clone()

clone

public 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

equals

public boolean equals(Object o)
Overrides:
equals in interface CIMElement

getOriginClass

public String getOriginClass()
Get the name of the origin class for this method.
Returns:
the name of the origin class for this method.

getOverridingMethod

public String getOverridingMethod()
Gets the name of the overriding method for this method.
Returns:
the name of the overriding method.

getParameters

public 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.

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

hashCode

public int hashCode()

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.

main

public static void main(String[] args)

removeProperty

public void removeProperty(String pParameterName)
Removes the specified property from the method. Returns normally if the methods does not exists.
Parameters:
pParameterName -

setOriginClass

public void setOriginClass(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(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.

setParameters

public void setParameters(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 -

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 method

Set the size of the type returned by the method.
Parameters:
pSize - - the size assigned to the method's return type

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 String toMOF()
Returns the MOF representation of the method.
Returns:
a string representation in MOF

toString

public String toString()

Copyright © 2005, 2006 IBM Corporation. All Rights Reserved.