Class JMethodDecl

Direct Known Subclasses:
JConstructorDecl

public class JMethodDecl extends JMemberDecl
A Java member for MethodDeclaration.
  • Constructor Details

    • JMethodDecl

      public JMethodDecl()
  • Method Details

    • getType

      public JType getType()
      Returns the field type.
    • setType

      public void setType(JType aType)
      Sets the field type.
    • getTypeParameters

      public List<JTypeParam> getTypeParameters()
      Returns the method JTypeParameters.
      Overrides:
      getTypeParameters in class JMemberDecl
    • setTypeParameters

      public void setTypeParameters(List<JTypeParam> theTPs)
      Sets the method JTypeParameters.
    • getParameters

      public List<JVariableDecl> getParameters()
      Returns the list of formal parameters.
    • getParametersTypes

      public Class[] getParametersTypes()
      Returns the list of formal parameters.
    • getThrowsList

      public List<JExpr> getThrowsList()
      Returns the throws list.
    • setThrowsList

      public void setThrowsList(List<JExpr> theThrows)
      Sets the throws list.
    • isBlock

      public boolean isBlock()
      Returns whether statement has a block associated with it.
      Overrides:
      isBlock in class JNode
    • getBlock

      public JStmtBlock getBlock()
      Returns the block.
      Overrides:
      getBlock in class JNode
    • setBlock

      public void setBlock(JStmtBlock aBlock)
      Sets the block.
    • getVariableDeclInside

      public JVariableDecl getVariableDeclInside(String aName)
      Returns a variable with given name.
      Overrides:
      getVariableDeclInside in class JNode
    • getVariableDecls

      public List<JVariableDecl> getVariableDecls(String aPrefix, List<JVariableDecl> theVariables)
      Returns a variable with given name.
      Overrides:
      getVariableDecls in class JNode
    • getClassDecls

      public JClassDecl[] getClassDecls()
      Returns the class declarations.
    • getClassDeclsImpl

      protected JClassDecl[] getClassDeclsImpl()
      Returns the class declarations.
    • getSuperMemberImpl

      protected Member getSuperMemberImpl()
      Returns the member that this member overrides or implements, if available.
      Overrides:
      getSuperMemberImpl in class JMemberDecl
    • getNodeString

      public String getNodeString()
      Returns the part name.
      Overrides:
      getNodeString in class JNode