|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.thoughtworks.qdox.model.AbstractBaseJavaEntity
com.thoughtworks.qdox.model.AbstractJavaEntity
com.thoughtworks.qdox.model.AbstractInheritableJavaEntity
com.thoughtworks.qdox.model.JavaMethod
com.thoughtworks.qdox.model.JavaMethodDelegate
public class JavaMethodDelegate
This class can be used to access overridden methods while keeping a reference to the original class. This is especially useful when trying to resolve generics
| Field Summary |
|---|
| Fields inherited from class com.thoughtworks.qdox.model.AbstractJavaEntity |
|---|
modifiers |
| Fields inherited from class com.thoughtworks.qdox.model.AbstractBaseJavaEntity |
|---|
name, parent |
| Constructor Summary | |
|---|---|
JavaMethodDelegate(JavaClass callingClass,
JavaMethod originalMethod)
|
|
| Method Summary | |
|---|---|
void |
addParameter(JavaParameter javaParameter)
|
int |
compareTo(Object o)
|
boolean |
equals(Object obj)
|
Annotation[] |
getAnnotations()
|
String |
getCallSignature()
|
String |
getCodeBlock()
|
String |
getComment()
|
String |
getDeclarationSignature(boolean withModifiers)
|
Type[] |
getExceptions()
|
Type |
getGenericReturnType()
Equivalent of java.lang.reflect.Method.getGenericReturnType() |
int |
getLineNumber()
|
String[] |
getModifiers()
Return list of modifiers as Strings. |
String |
getName()
|
String |
getNamedParameter(String tagName,
String parameterName)
Convenience method for getTagByName(String).getNamedParameter(String)
that also checks for null tag. |
JavaParameter |
getParameterByName(String name)
|
JavaParameter[] |
getParameters()
|
Type[] |
getParameterTypes()
|
Type[] |
getParameterTypes(boolean resolve)
If a class inherits this method from a generic class or interface, you can use this method to get the resolved parameter types |
protected Type[] |
getParameterTypes(boolean resolve,
JavaClass _callingClass)
|
JavaClassParent |
getParent()
|
JavaClass |
getParentClass()
Not every entity has a parentClass, but AnnotationFieldRef requires access to it. |
String |
getPropertyName()
|
Type |
getPropertyType()
|
Type |
getReturns()
|
Type |
getReturnType()
Equivalent of java.lang.reflect.Method.getReturnType() |
Type |
getReturnType(boolean resolve)
If a class inherits this method from a generic class or interface, you can use this method to get the resolved return type |
protected Type |
getReturnType(boolean resolve,
JavaClass _callingClass)
|
JavaSource |
getSource()
|
String |
getSourceCode()
Get the original source code of the body of this method. |
DocletTag |
getTagByName(String name)
|
DocletTag |
getTagByName(String name,
boolean inherited)
|
DocletTag[] |
getTags()
|
DocletTag[] |
getTagsByName(String name)
|
DocletTag[] |
getTagsByName(String name,
boolean inherited)
|
TypeVariable[] |
getTypeParameters()
|
int |
hashCode()
|
boolean |
isAbstract()
|
boolean |
isConstructor()
|
boolean |
isFinal()
|
boolean |
isNative()
|
boolean |
isPrivate()
|
boolean |
isPropertyAccessor()
|
boolean |
isPropertyMutator()
|
boolean |
isProtected()
|
boolean |
isPublic()
|
boolean |
isStatic()
|
boolean |
isStrictfp()
|
boolean |
isSynchronized()
|
boolean |
isTransient()
|
boolean |
isVarArgs()
|
boolean |
isVolatile()
|
void |
setAnnotations(Annotation[] annotations)
|
void |
setComment(String comment)
|
void |
setConstructor(boolean constructor)
|
void |
setExceptions(Type[] exceptions)
|
void |
setLineNumber(int lineNumber)
|
void |
setModifiers(String[] modifiers)
|
void |
setName(String name)
|
void |
setParent(JavaClassParent parent)
|
void |
setParentClass(JavaClass parentClass)
|
void |
setReturns(Type returns)
Define the return type of this method |
void |
setSourceCode(String sourceCode)
|
void |
setTags(List tagList)
|
void |
setTypeParameters(TypeVariable[] typeParameters)
|
boolean |
signatureMatches(String name,
Type[] parameterTypes)
This method is NOT varArg aware. |
boolean |
signatureMatches(String name,
Type[] parameterTypes,
boolean varArg)
|
String |
toString()
|
| Methods inherited from class com.thoughtworks.qdox.model.JavaMethod |
|---|
writeBody, writeBody |
| Methods inherited from class com.thoughtworks.qdox.model.AbstractJavaEntity |
|---|
write, writeAccessibilityModifier, writeAllModifiers, writeNonAccessibilityModifiers |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JavaMethodDelegate(JavaClass callingClass,
JavaMethod originalMethod)
| Method Detail |
|---|
public Type getReturnType(boolean resolve)
JavaMethod
getReturnType in class JavaMethod
protected Type getReturnType(boolean resolve,
JavaClass _callingClass)
getReturnType in class JavaMethodpublic Type[] getParameterTypes(boolean resolve)
JavaMethod
getParameterTypes in class JavaMethod
protected Type[] getParameterTypes(boolean resolve,
JavaClass _callingClass)
getParameterTypes in class JavaMethodpublic void addParameter(JavaParameter javaParameter)
addParameter in class JavaMethodpublic int compareTo(Object o)
compareTo in interface ComparablecompareTo in class JavaMethodpublic boolean equals(Object obj)
equals in class JavaMethodpublic Annotation[] getAnnotations()
getAnnotations in class AbstractBaseJavaEntitypublic String getCallSignature()
getCallSignature in interface MembergetCallSignature in class JavaMethodpublic String getCodeBlock()
getCodeBlock in class AbstractJavaEntitypublic String getComment()
getComment in class AbstractJavaEntitypublic String getDeclarationSignature(boolean withModifiers)
getDeclarationSignature in interface MembergetDeclarationSignature in class JavaMethodpublic Type[] getExceptions()
getExceptions in class JavaMethodpublic Type getGenericReturnType()
JavaMethod
getGenericReturnType in class JavaMethodpublic int getLineNumber()
getLineNumber in class AbstractBaseJavaEntitypublic String[] getModifiers()
AbstractJavaEntity
getModifiers in class AbstractJavaEntitypublic String getName()
getName in class AbstractBaseJavaEntity
public String getNamedParameter(String tagName,
String parameterName)
AbstractJavaEntitygetTagByName(String).getNamedParameter(String)
that also checks for null tag.
getNamedParameter in class AbstractJavaEntitypublic JavaParameter getParameterByName(String name)
getParameterByName in class JavaMethodpublic JavaParameter[] getParameters()
getParameters in class JavaMethodpublic Type[] getParameterTypes()
getParameterTypes in class JavaMethodpublic JavaClassParent getParent()
getParent in class AbstractBaseJavaEntitypublic JavaClass getParentClass()
AbstractBaseJavaEntity
getParentClass in class AbstractJavaEntitypublic String getPropertyName()
getPropertyName in class JavaMethodpublic Type getPropertyType()
getPropertyType in class JavaMethodpublic Type getReturns()
getReturns in class JavaMethodpublic Type getReturnType()
JavaMethod
getReturnType in class JavaMethodpublic JavaSource getSource()
getSource in class AbstractJavaEntitypublic String getSourceCode()
JavaMethod
getSourceCode in class JavaMethod
public DocletTag getTagByName(String name,
boolean inherited)
getTagByName in class AbstractInheritableJavaEntitypublic DocletTag getTagByName(String name)
getTagByName in class AbstractJavaEntitypublic DocletTag[] getTags()
getTags in class AbstractJavaEntity
public DocletTag[] getTagsByName(String name,
boolean inherited)
getTagsByName in class JavaMethodpublic DocletTag[] getTagsByName(String name)
getTagsByName in class AbstractJavaEntitypublic TypeVariable[] getTypeParameters()
getTypeParameters in class JavaMethodpublic int hashCode()
hashCode in class JavaMethodpublic boolean isAbstract()
isAbstract in class AbstractJavaEntitypublic boolean isConstructor()
isConstructor in class JavaMethodpublic boolean isFinal()
isFinal in class AbstractJavaEntitypublic boolean isNative()
isNative in class AbstractJavaEntitypublic boolean isPrivate()
isPrivate in class AbstractJavaEntitypublic boolean isPropertyAccessor()
isPropertyAccessor in class JavaMethodpublic boolean isPropertyMutator()
isPropertyMutator in class JavaMethodpublic boolean isProtected()
isProtected in class AbstractJavaEntitypublic boolean isPublic()
isPublic in class JavaMethodpublic boolean isStatic()
isStatic in class AbstractJavaEntitypublic boolean isStrictfp()
isStrictfp in class AbstractJavaEntitypublic boolean isSynchronized()
isSynchronized in class AbstractJavaEntitypublic boolean isTransient()
isTransient in class AbstractJavaEntitypublic boolean isVarArgs()
isVarArgs in class JavaMethodpublic boolean isVolatile()
isVolatile in class AbstractJavaEntitypublic void setAnnotations(Annotation[] annotations)
setAnnotations in class AbstractBaseJavaEntitypublic void setComment(String comment)
setComment in class AbstractJavaEntitypublic void setConstructor(boolean constructor)
setConstructor in class JavaMethodpublic void setExceptions(Type[] exceptions)
setExceptions in class JavaMethodpublic void setLineNumber(int lineNumber)
setLineNumber in class AbstractBaseJavaEntitypublic void setModifiers(String[] modifiers)
setModifiers in class AbstractJavaEntitypublic void setName(String name)
setName in class AbstractBaseJavaEntitypublic void setParent(JavaClassParent parent)
setParent in class AbstractBaseJavaEntitypublic void setParentClass(JavaClass parentClass)
setParentClass in class AbstractJavaEntitypublic void setReturns(Type returns)
JavaMethod
setReturns in class JavaMethodreturns - the return typepublic void setSourceCode(String sourceCode)
setSourceCode in class JavaMethodpublic void setTags(List tagList)
setTags in class AbstractJavaEntitypublic void setTypeParameters(TypeVariable[] typeParameters)
setTypeParameters in class JavaMethod
public boolean signatureMatches(String name,
Type[] parameterTypes,
boolean varArg)
signatureMatches in class JavaMethodname - method nameparameterTypes - parameter types or null if there are no parameters.
public boolean signatureMatches(String name,
Type[] parameterTypes)
JavaMethod
signatureMatches in class JavaMethodpublic String toString()
toString in class JavaMethod
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||