javax.cim

Class CIMMethod<E>

public class CIMMethod<E> extends CIMTypedElement implements CIMQualifiedElementInterface

This class represents a CIM Method as defined by the Distributed Management Task Force (DMTF) CIM Infrastructure Specification (DSP004).

Parameters: Type parameter.

Constructor Summary
CIMMethod(String pName, CIMDataType pType, CIMQualifier<?>[] pQualis, CIMParameter<?>[] pParams, boolean pPropagated, String pOriginClass)
Constructs a CIMMethod object with the specified information.
Method Summary
CIMMethod<E>filter(boolean pIncludeQualifiers, boolean pIncludeClassOrigin)
Returns a CIMMethod filtered as specified.
CIMMethod<E>filter(boolean pIncludeQualifiers, boolean pIncludeClassOrigin, boolean pLocalOnly)
Returns a CIMMethod filtered as specified.
StringgetOriginClass()
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<?>[]getParameters()
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.
intgetQualifierCount()
Get the number of qualifiers defined for this CIM Method.
CIMQualifier<?>[]getQualifiers()
Returns the list of qualifiers for this class.
ObjectgetQualifierValue(String pName)
Gets a qualifier value by name.
booleanhasQualifier(String pName)
Checks whether the specified qualifier is one of the qualifiers in this CIM method.
booleanhasQualifierValue(String pName, Object pValue)
Checks whether the specified qualifier is one of the qualifiers defined for this method with the specified value.
booleanisPropagated()
Determines if this method is Propagated.

Constructor Detail

CIMMethod

public CIMMethod(String pName, CIMDataType pType, CIMQualifier<?>[] pQualis, CIMParameter<?>[] pParams, boolean pPropagated, 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

filter

public CIMMethod<E> filter(boolean pIncludeQualifiers, boolean pIncludeClassOrigin)
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.

Returns: A filtered CIMMethod.

filter

public CIMMethod<E> 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 If true only the qualifiers defined on this class are included; otherwise all qualifiers are included.

Returns: A filtered CIMMethod.

getOriginClass

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

Parameters: pIndex The index of the qualifier.

Returns: The Qualifier at index pIndex.

Throws: ArrayIndexOutOfBoundsException

getQualifier

public CIMQualifier<?> getQualifier(String pName)
Gets a qualifier by name.

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.

Returns: The number of qualifiers.

getQualifiers

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

Returns: Qualifiers for this class.

getQualifierValue

public Object getQualifierValue(String pName)
Gets a qualifier value by name.

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.

hasQualifier

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

Parameters: pName The name of the qualifier.

Returns: true if the qualifier exists in this CIM method, otherwise false.

hasQualifierValue

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

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.

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