xjavadoc
Interface XMethod

All Superinterfaces:
Comparable, Named, XExecutableMember, XMember, XProgramElement
All Known Implementing Classes:
MethodImpl

public interface XMethod
extends XExecutableMember

Describe what this class does

Author:
Aslak Hellesøy

Nested Class Summary
static class XMethod.PropertyAccessorPredicate
           
static class XMethod.PropertyMutatorPredicate
           
 
Field Summary
static Predicate PROPERTY_ACCESSOR_PREDICATE
          Predicate that can be used to retrieve all property accessor methods.
static Predicate PROPERTY_MUTATOR_PREDICATE
          Predicate that can be used to retrieve all property mutator methods.
 
Method Summary
 XMethod getAccessor()
          If this method is a mutator, and a corresponding accessor exists, that accessor will be returned.
 XMethod getMutator()
          If this method is an accessor, and a corresponding mutator exists, that mutator will be returned.
 String getNameWithoutPrefix()
          Returns the name of the method with the prefix stripped away.
 String getPropertyName()
          Returns the property name of this method (if it is an accessor or mutator), or null if it is not.
 Type getPropertyType()
          Returns the type of the property this method represents, or null if this method is not a property method.
 Type getReturnType()
          Returns the return type of the method.
 boolean isPropertyAccessor()
           
 boolean isPropertyMutator()
           
 
Methods inherited from interface xjavadoc.XExecutableMember
getNameWithSignature, getParameters, getParameterTypes, getSignature, getThrownExceptions, isConstructor, isNative, isSynchronized, throwsException
 
Methods inherited from interface xjavadoc.XProgramElement
getContainingClass, getContainingPackage, getDoc, getModifiers, getModifierSpecifier, getSuperElement, getSuperInterfaceElements, getXJavaDoc, isAbstract, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, updateDoc
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface xjavadoc.Named
getName
 

Field Detail

PROPERTY_MUTATOR_PREDICATE

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


PROPERTY_ACCESSOR_PREDICATE

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

Method Detail

getReturnType

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

Returns:
the return type of the method.

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:
isPropertyMutator(), isPropertyAccessor(), getPropertyName()

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.

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.

isPropertyMutator

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

isPropertyAccessor

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

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.


Copyright © 2002-2004 XDoclet Team. All Rights Reserved.