xjavadoc

Interface XMethod

public interface XMethod extends XExecutableMember

Describe what this class does

Author: Aslak Hellesxy

UNKNOWN: 25. februar 2003

Nested Class Summary
static classXMethod.PropertyAccessorPredicate
static classXMethod.PropertyMutatorPredicate
Field Summary
static PredicatePROPERTY_ACCESSOR_PREDICATE
Predicate that can be used to retrieve all property accessor methods.
static PredicatePROPERTY_MUTATOR_PREDICATE
Predicate that can be used to retrieve all property mutator methods.
Method Summary
XMethodgetAccessor()
If this method is a mutator, and a corresponding accessor exists, that accessor will be returned.
XMethodgetMutator()
If this method is an accessor, and a corresponding mutator exists, that mutator will be returned.
StringgetNameWithoutPrefix()
Returns the name of the method with the prefix stripped away.
StringgetPropertyName()
Returns the property name of this method (if it is an accessor or mutator), or null if it is not.
TypegetPropertyType()
Returns the type of the property this method represents, or null if this method is not a property method.
TypegetReturnType()
Returns the return type of the method.
booleanisPropertyAccessor()
booleanisPropertyMutator()

Field Detail

PROPERTY_ACCESSOR_PREDICATE

public static final Predicate PROPERTY_ACCESSOR_PREDICATE
Predicate that can be used to retrieve all property accessor methods.

PROPERTY_MUTATOR_PREDICATE

public static final Predicate PROPERTY_MUTATOR_PREDICATE
Predicate that can be used to retrieve all property mutator methods.

Method Detail

getAccessor

public XMethod getAccessor()
If this method is a mutator, and a corresponding accessor exists, that accessor will be returned. Otherwise, null is returned.

Returns: the corresponding accessor.

getMutator

public XMethod getMutator()
If this method is an accessor, and a corresponding mutator exists, that mutator will be returned. Otherwise, null is returned.

Returns: the corresponding mutator.

getNameWithoutPrefix

public String getNameWithoutPrefix()
Returns the name of the method with the prefix stripped away. The prefix is the first series of lower case characters. Example:

Returns: the property name.

getPropertyName

public String getPropertyName()
Returns the property name of this method (if it is an accessor or mutator), or null if it is not.

Returns: the property name.

getPropertyType

public Type getPropertyType()
Returns the type of the property this method represents, or null if this method is not a property method.

Returns: the property type

See Also: XMethod XMethod XMethod

getReturnType

public Type getReturnType()
Returns the return type of the method.

Returns: the return type of the method.

isPropertyAccessor

public boolean isPropertyAccessor()

Returns: true if this is a public Xxx getXxx() method

isPropertyMutator

public boolean isPropertyMutator()

Returns: true if this is a public void setXxx(Xxx) method