com.thoughtworks.qdox.model
Class JavaMethod

java.lang.Object
  extended bycom.thoughtworks.qdox.model.AbstractJavaEntity
      extended bycom.thoughtworks.qdox.model.AbstractInheritableJavaEntity
          extended bycom.thoughtworks.qdox.model.JavaMethod
All Implemented Interfaces:
java.lang.Comparable, Member, java.io.Serializable

public class JavaMethod
extends AbstractInheritableJavaEntity
implements Member

See Also:
Serialized Form

Field Summary
protected  Type returns
           
 
Fields inherited from class com.thoughtworks.qdox.model.AbstractJavaEntity
modifiers, name
 
Constructor Summary
JavaMethod()
           
JavaMethod(JavaClass parent)
           
JavaMethod(JavaClass parent, int lineNumber)
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getCallSignature()
           
 java.lang.String getDeclarationSignature(boolean withModifiers)
           
 Type[] getExceptions()
           
 JavaParameter getParameterByName(java.lang.String name)
           
 JavaParameter[] getParameters()
           
 JavaClass getParentClass()
           
 java.lang.String getPropertyName()
           
 Type getPropertyType()
           
 Type getReturns()
           
 DocletTag[] getTagsByName(java.lang.String name, boolean inherited)
           
 int hashCode()
           
 boolean isConstructor()
           
 boolean isPropertyAccessor()
           
 boolean isPropertyMutator()
           
 boolean isPublic()
           
 void setConstructor(boolean constructor)
           
 void setExceptions(Type[] exceptions)
           
 void setParameters(JavaParameter[] parameters)
           
 void setParentClass(JavaClass parentClass)
          Deprecated. Don't call this - the parent is set in the constructor.
 void setReturns(Type returns)
           
 boolean signatureMatches(java.lang.String name, Type[] parameterTypes)
           
protected  void writeBody(IndentBuffer result)
           
protected  void writeBody(IndentBuffer result, boolean withModifiers, boolean isDeclaration, boolean isPrettyPrint)
           
 
Methods inherited from class com.thoughtworks.qdox.model.AbstractInheritableJavaEntity
getTagByName
 
Methods inherited from class com.thoughtworks.qdox.model.AbstractJavaEntity
getComment, getLineNumber, getModifiers, getName, getNamedParameter, getParent, getSource, getTagByName, getTags, getTagsByName, isAbstract, isFinal, isNative, isPrivate, isProtected, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, setComment, setModifiers, setName, setTags, toString, write, writeAccessibilityModifier, writeAllModifiers, writeNonAccessibilityModifiers
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

returns

protected Type returns
Constructor Detail

JavaMethod

public JavaMethod(JavaClass parent,
                  int lineNumber)

JavaMethod

public JavaMethod(JavaClass parent)

JavaMethod

public JavaMethod()
Method Detail

getReturns

public Type getReturns()

getParameters

public JavaParameter[] getParameters()

getParameterByName

public JavaParameter getParameterByName(java.lang.String name)

getExceptions

public Type[] getExceptions()

isConstructor

public boolean isConstructor()

writeBody

protected void writeBody(IndentBuffer result)
Specified by:
writeBody in class AbstractJavaEntity

writeBody

protected void writeBody(IndentBuffer result,
                         boolean withModifiers,
                         boolean isDeclaration,
                         boolean isPrettyPrint)
Since:
1.3

getDeclarationSignature

public java.lang.String getDeclarationSignature(boolean withModifiers)
Specified by:
getDeclarationSignature in interface Member
Since:
1.3

getCallSignature

public java.lang.String getCallSignature()
Specified by:
getCallSignature in interface Member
Since:
1.3

setReturns

public void setReturns(Type returns)

setParameters

public void setParameters(JavaParameter[] parameters)

setExceptions

public void setExceptions(Type[] exceptions)

setConstructor

public void setConstructor(boolean constructor)

equals

public boolean equals(java.lang.Object obj)

signatureMatches

public boolean signatureMatches(java.lang.String name,
                                Type[] parameterTypes)
Parameters:
name - method name
parameterTypes - parameter types or null if there are no parameters.
Returns:
true if the signature and parameters match.

hashCode

public int hashCode()

getParentClass

public JavaClass getParentClass()

setParentClass

public void setParentClass(JavaClass parentClass)
Deprecated. Don't call this - the parent is set in the constructor.


isPublic

public boolean isPublic()
Overrides:
isPublic in class AbstractJavaEntity

isPropertyAccessor

public boolean isPropertyAccessor()
Returns:
true if this method is a Java Bean accessor
Since:
1.3

isPropertyMutator

public boolean isPropertyMutator()
Returns:
true if this method is a Java Bean accessor
Since:
1.3

getPropertyType

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

getPropertyName

public java.lang.String getPropertyName()
Returns:
the name of the property this method represents, or null if this method is not a property mutator or property accessor.
Since:
1.3

getTagsByName

public DocletTag[] getTagsByName(java.lang.String name,
                                 boolean inherited)
Specified by:
getTagsByName in class AbstractInheritableJavaEntity

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable


Copyright © 2002-2007 ThoughtWorks, Inc. All Rights Reserved.