javax.cim
Class CIMMethod

java.lang.Object
  extended by javax.cim.CIMElement
      extended by javax.cim.CIMTypedElement
          extended by javax.cim.CIMMethod
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, CIMQualifiedElementInterface

public class CIMMethod
extends CIMTypedElement
implements CIMQualifiedElementInterface, java.io.Serializable

Creates and instantiates a CIM method.

See Also:
Serialized Form

Constructor Summary
CIMMethod(java.lang.String pName, CIMDataType pType, CIMQualifier[] pQualis, CIMParameter[] pParams, boolean pPropagated, java.lang.String pOriginClass)
          Constructs a CIMMethod object with the specified information.
 
Method Summary
 boolean equals(java.lang.Object pObj)
          Compares this object against the specified object.
 CIMMethod filter(boolean pIncludeQualifiers, boolean pIncludeClassOrigin)
          filter
 CIMMethod filter(boolean pIncludeQualifiers, boolean pIncludeClassOrigin, boolean pLocalOnly)
          Returns a CIMMethod filtered as specified.
 java.lang.String getOriginClass()
          Returns the class name in which this method was defined or overridden.
 CIMParameter getParameter(java.lang.String pName)
          Get the parameter that matches the specified name.
 CIMParameter[] getParameters()
          Returns an array of the parameters for this method.
 CIMQualifier getQualifier(int pIndex)
          Get a qualifier by index.
 CIMQualifier getQualifier(java.lang.String pName)
          Gets a qualifier by name.
 int getQualifierCount()
          Get the number of qualifiers defined for this CIM Element.
 CIMQualifier[] getQualifiers()
          Returns the list of qualifiers for this class.
 java.lang.Object getQualifierValue(java.lang.String pName)
          Gets a qualifier value by name.
 boolean hasQualifier(java.lang.String pName)
          Checks whether the specified qualifier is one of the qualifiers in this CIM element.
 boolean hasQualifierValue(java.lang.String pName, java.lang.Object pValue)
          Checks whether the specified qualifier is one of the qualifiers defined for this property with the specified value.
 boolean isPropagated()
          isPropagated
 java.lang.String toString()
          Returns a String representation of the CIMMethod.
 
Methods inherited from class javax.cim.CIMTypedElement
getDataType
 
Methods inherited from class javax.cim.CIMElement
compareTo, getName, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CIMMethod

public CIMMethod(java.lang.String pName,
                 CIMDataType pType,
                 CIMQualifier[] pQualis,
                 CIMParameter[] pParams,
                 boolean pPropagated,
                 java.lang.String pOriginClass)
Constructs a CIMMethod 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 Detail

equals

public boolean equals(java.lang.Object pObj)
Description copied from class: CIMTypedElement
Compares this object against the specified object. The result is true if and only if the argument is not null and is a CIMValuedObject that represents the same name, type and value as this object.

Overrides:
equals in class CIMTypedElement
Parameters:
pObj - - The object to compare with.
Returns:
true if the objects are the same; false otherwise.
See Also:
CIMTypedElement.equals(java.lang.Object)

filter

public CIMMethod filter(boolean pIncludeQualifiers,
                        boolean pIncludeClassOrigin)
filter

Parameters:
pIncludeQualifiers - If true all qualifiers are returned; otherwise no qualifiers.
pIncludeClassOrigin - If true the class origin is included; otherwise no class origin is present.
Returns:
CIMMethod A filtered CIMMethod

filter

public CIMMethod filter(boolean pIncludeQualifiers,
                        boolean pIncludeClassOrigin,
                        boolean pLocalOnly)
Returns a CIMMethod filtered as specified.

Parameters:
pIncludeQualifiers - If true all qualifiers are returned; otherwise no qualifiers.
pIncludeClassOrigin - If true the class origin is included; otherwise no class origin is present
pLocalOnly -
Returns:
CIMMethod A filtered CIMMethod

isPropagated

public boolean isPropagated()
isPropagated

Returns:
boolean

getOriginClass

public java.lang.String getOriginClass()
Returns the class name in which this method was defined or overridden.

Returns:
Name of class where this property was defined.

getParameter

public CIMParameter getParameter(java.lang.String pName)
Get the parameter that matches the specified name.

Parameters:
pName - The name of the CIMParameter to retrieve
Returns:
CIMParameter matching the name specified; otherwise null

getParameters

public CIMParameter[] getParameters()
Returns an array of the parameters for this method.

Returns:
The parameters for this method.

getQualifier

public CIMQualifier getQualifier(int pIndex)
Get a qualifier by index.

Specified by:
getQualifier in interface CIMQualifiedElementInterface
Parameters:
pIndex - - The index of the qualifier
Returns:
The Qualifier at index pIndex

getQualifier

public CIMQualifier getQualifier(java.lang.String pName)
Gets a qualifier by name.

Specified by:
getQualifier in interface CIMQualifiedElementInterface
Parameters:
pName - - The name of the qualifier to get.
Returns:
null if the qualifier does not exist, otherwise returns the reference to the qualifier.

getQualifierValue

public java.lang.Object getQualifierValue(java.lang.String pName)
Description copied from interface: CIMQualifiedElementInterface
Gets a qualifier value by name.

Specified by:
getQualifierValue in interface CIMQualifiedElementInterface
Parameters:
pName - - The name of the qualifier to get.
Returns:
null if the qualifier does not exist or value is null, otherwise returns the reference to the qualifier.
See Also:
CIMQualifiedElementInterface.getQualifierValue(java.lang.String)

getQualifierCount

public int getQualifierCount()
Get the number of qualifiers defined for this CIM Element.

Specified by:
getQualifierCount in interface CIMQualifiedElementInterface
Returns:
The number of qualifiers.

getQualifiers

public CIMQualifier[] getQualifiers()
Returns the list of qualifiers for this class.

Specified by:
getQualifiers in interface CIMQualifiedElementInterface
Returns:
Qualifiers for this class.

hasQualifier

public boolean hasQualifier(java.lang.String pName)
Checks whether the specified qualifier is one of the qualifiers in this CIM element.

Specified by:
hasQualifier in interface CIMQualifiedElementInterface
Parameters:
pName - - The name of the qualifier.
Returns:
true if the qualifier exists in this CIM element, otherwise false.

hasQualifierValue

public boolean hasQualifierValue(java.lang.String pName,
                                 java.lang.Object pValue)
Description copied from interface: CIMQualifiedElementInterface
Checks whether the specified qualifier is one of the qualifiers defined for this property with the specified value. This method will return false if the qualifier is not applied or if the value does not match.

Specified by:
hasQualifierValue in interface CIMQualifiedElementInterface
Parameters:
pName - - the name of the qualifier
pValue - - the value to be tested
Returns:
true if the qualifier exists and has the value, otherwise false.
See Also:
CIMQualifiedElementInterface.hasQualifierValue(java.lang.String, java.lang.Object)

toString

public java.lang.String toString()
Returns a String representation of the CIMMethod. 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 be null.

Overrides:
toString in class CIMTypedElement
Returns:
The string representation of this method.
See Also:
CIMElement.toString()


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