com.sun.source.tree

## Interface MethodTree

- All Superinterfaces:
    Tree

      public interface MethodTree
      extends Tree

  A tree node for a method or annotation type element declaration. For example:

         modifiers typeParameters type name
            ( parameters )
            body

         modifiers type name () default defaultValue

  Since:
    1.6
  See The Java™ Language Specification:
    sections 8.4, 8.6, 8.7, 9.4, and 9.6

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

      `Tree.Kind`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `BlockTree` | `getBody()`
    `Tree` | `getDefaultValue()`
    `ModifiersTree` | `getModifiers()`
    `Name` | `getName()`
    `List<? extends VariableTree>` | `getParameters()`
    `Tree` | `getReturnType()`
    `List<? extends ExpressionTree>` | `getThrows()`
    `List<? extends TypeParameterTree>` | `getTypeParameters()`

    - ### Methods inherited from interface com.sun.source.tree.Tree

      `accept, getKind`

- - ### Method Detail

    - #### getModifiers

          ModifiersTree getModifiers()

    - #### getName

          Name getName()

    - #### getReturnType

          Tree getReturnType()

    - #### getTypeParameters

          List<? extends TypeParameterTree> getTypeParameters()

    - #### getParameters

          List<? extends VariableTree> getParameters()

    - #### getThrows

          List<? extends ExpressionTree> getThrows()

    - #### getBody

          BlockTree getBody()

    - #### getDefaultValue

          Tree getDefaultValue()

Copyright © 2005, 2019, Oracle and/or its affiliates. All rights reserved.