public interface MethodTree extends Tree
modifiers typeParameters type name ( parameters ) body modifiers type name () default defaultValue
Modifier and Type | Method and Description |
---|---|
BlockTree |
getBody()
Returns the method body, or
null if this is an abstract or native method. |
Tree |
getDefaultValue()
Returns the default value, if this is an element within
an annotation type declaration.
|
ModifiersTree |
getModifiers()
Returns the modifiers, including any annotations for the method being declared.
|
Name |
getName()
Returns the name of the method being declared.
|
List<? extends VariableTree> |
getParameters()
Returns the parameters of the method being declared.
|
VariableTree |
getReceiverParameter()
Return an explicit receiver parameter ("this" parameter),
or
null if none. |
Tree |
getReturnType()
Returns the return type of the method being declared.
|
List<? extends ExpressionTree> |
getThrows()
Returns the exceptions listed as being thrown by this method.
|
List<? extends TypeParameterTree> |
getTypeParameters()
Returns the type parameters of the method being declared.
|
ModifiersTree getModifiers()
Name getName()
Tree getReturnType()
null
for a constructor.List<? extends TypeParameterTree> getTypeParameters()
List<? extends VariableTree> getParameters()
VariableTree getReceiverParameter()
null
if none.List<? extends ExpressionTree> getThrows()
BlockTree getBody()
null
if this is an abstract or native method.Tree getDefaultValue()
null
otherwise.
Copyright © 2005, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-04-22-203349.buildd.src