public interface SourceMethod extends SourceMember, SourceHasName, SourceHasBlock, JavaMethod
Modifier and Type | Field and Description |
---|---|
static SourceMethod[] |
EMPTY_ARRAY |
static int |
PRINT_DECLARATION
Constant that can be used as the format argument in calls to
SourceMethod.print(int) or SourceMethod.print(PrintWriter, int).
|
static int |
PRINT_SIGNATURE
Constant that can be used as the format argument in calls to
SourceMethod.print(int) or SourceMethod.print(PrintWriter, int).
|
CHILDREN_ALL, CHILDREN_BLANKLINES, CHILDREN_COMMENTS, CHILDREN_default, CHILDREN_none, CHILDREN_REGULAR, PRINT_ALL, REFORMAT_ALL, REFORMAT_INDENT
Modifier and Type | Method and Description |
---|---|
SourceFormalParameterList |
getFormalParameterList()
Gets the formal parameter list object.
|
java.util.List<SourceClass> |
getSourceAnonymousClasses()
Gets the list of anonymous class declarations enclosed
by this method, but not enclosed by any inner class of
this method.
|
java.util.List<SourceTypeReference> |
getSourceExceptions()
Gets the list of source exception types.
|
java.util.List<SourceClass> |
getSourceLocalClasses()
Gets the list of local class declarations enclosed
by this method, but not enclosed by any inner class of
this method.
|
java.util.List<SourceVariable> |
getSourceParameters()
Gets the list of source parameters.
|
java.util.List<SourceAnnotation> |
getSourceReceiverAnnotations()
Get the receiver annotations for this method.
|
SourceTypeReference |
getSourceReturnType()
Gets the source return type.
|
java.util.List<SourceTypeParameter> |
getSourceTypeParameters()
Gets the declared type parameters on this method.
|
SourceThrowsClause |
getThrowsClause()
Gets the throws clause object.
|
boolean |
isConstructor()
True if this is a constructor.
|
boolean |
isVarargs()
Tests if this method is modified by ACC_VARARGS.
|
void |
setSourceReturnType(SourceTypeReference type)
Attempts to set the return type of this method.
|
getEnclosingClass, hasDeprecatedTag, hasHiddenTag
addModifiers, getModifiers, getSourceAnnotations, hasSourceAnnotation, isValidModifiers, removeModifiers, setModifiers
getDocComment, setDocComment
addSelf, addSelf, addSelfAfter, addSelfBefore, adjustTextIndentation, clearBinding, cloneSelf, compile, createContext, getBinding, getChildren, getChildren, getCompiledObject, getContainedElements, getContext, getEndOffset, getFirstToken, getJdkVersion, getLastToken, getOwningFile, getOwningSourceFile, getParent, getSiblingAfter, getSiblingAfter, getSiblingBefore, getSiblingBefore, getSiblings, getSiblings, getStartOffset, getSymbolKind, getText, getTokens, getTokens, hasErrors, print, print, print, print, reformatSelf, removeSelf, replaceSelf, resolve, setBinding, setContext, visitSelf
getName, getNameElement, setName, setNameElement
getBlock, setBlock
getDeclaredAnonymousClasses, getDeclaredLocalClasses, getDefaultValue, getDescriptor, getExceptions, getMethodErasure, getNonParameterizedMethod, getOverriddenMethods, getParameters, getParameterTypes, getReceiverTypeAnnotations, getReturnType, getSignature, getSourceElement, getTypeSignature, hasSubsignatureOf, isNative
getActualTypeArguments, getTypeParameter, getTypeParameters, hasActualTypeArguments, hasTypeParameters
getOwningClass, getUniqueIdentifier, isAbstract, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
getResolvedType, getUnresolvedType
getName
getAnnotation, getAnnotations, getDeclaredAnnotation, getDeclaredAnnotations, hasAnnotation, hasDeclaredAnnotation
getElementKind, getFile, getModifiers, getOwner, isDeprecated, isFinal, isHidden, isSourceElement, isSynthetic, printCompiledInfo
static final SourceMethod[] EMPTY_ARRAY
static final int PRINT_SIGNATURE
static final int PRINT_DECLARATION
boolean isConstructor()
isConstructor
in interface JavaMethod
boolean isVarargs()
isVarargs
in interface JavaMethod
java.util.List<SourceTypeParameter> getSourceTypeParameters()
SourceTypeReference getSourceReturnType()
void setSourceReturnType(SourceTypeReference type)
java.lang.UnsupportedOperationException
- if this is a constructor.java.util.List<SourceVariable> getSourceParameters()
java.util.List<SourceTypeReference> getSourceExceptions()
SourceFormalParameterList getFormalParameterList()
SourceThrowsClause getThrowsClause()
java.util.List<SourceClass> getSourceAnonymousClasses()
java.util.List<SourceClass> getSourceLocalClasses()
java.util.List<SourceAnnotation> getSourceReceiverAnnotations()