Class JMethodDecl
- java.lang.Object
-
- com.inductiveautomation.snap.javatree.JNode
-
- com.inductiveautomation.snap.javatree.JMemberDecl
-
- com.inductiveautomation.snap.javatree.JMethodDecl
-
- Direct Known Subclasses:
JConstructorDecl
public class JMethodDecl extends JMemberDecl
A Java member for MethodDeclaration.
-
-
Constructor Summary
Constructors Constructor Description JMethodDecl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JStmtBlock
getBlock()
Returns the block.JClassDecl[]
getClassDecls()
Returns the class declarations.protected JClassDecl[]
getClassDeclsImpl()
Returns the class declarations.java.lang.String
getNodeString()
Returns the part name.java.util.List<JVariableDecl>
getParameters()
Returns the list of formal parameters.java.lang.Class[]
getParametersTypes()
Returns the list of formal parameters.protected java.lang.reflect.Member
getSuperMemberImpl()
Returns the member that this member overrides or implements, if available.java.util.List<JExpr>
getThrowsList()
Returns the throws list.JType
getType()
Returns the field type.java.util.List<JTypeParam>
getTypeParameters()
Returns the method JTypeParameters.JVariableDecl
getVariableDeclInside(java.lang.String aName)
Returns a variable with given name.java.util.List<JVariableDecl>
getVariableDecls(java.lang.String aPrefix, java.util.List<JVariableDecl> theVariables)
Returns a variable with given name.boolean
isBlock()
Returns whether statement has a block associated with it.void
setBlock(JStmtBlock aBlock)
Sets the block.void
setThrowsList(java.util.List<JExpr> theThrows)
Sets the throws list.void
setType(JType aType)
Sets the field type.void
setTypeParameters(java.util.List<JTypeParam> theTPs)
Sets the method JTypeParameters.-
Methods inherited from class com.inductiveautomation.snap.javatree.JMemberDecl
getDeclaringClass, getIdentifier, getModifiers, getNameImpl, getSuperMember, getTypeParameter, setIdentifier, setModifiers
-
Methods inherited from class com.inductiveautomation.snap.javatree.JNode
addChild, buildChildren, getChild, getChildCount, getChildren, getClassLoader, getClassName, getClassNameImpl, getClassRef, getClassRefImpl, getEnclosingClassDecl, getEnclosingMemberDecl, getEnclosingMethodDecl, getEnd, getEndToken, getFile, getJClass, getLineIndex, getName, getNodeAtCharIndex, getNodeFields, getNodeFieldsImpl, getNodeParents, getNodePath, getOthers, getParent, getParent, getReferencedClasses, getReferencedClassNames, getReferencedClassNames, getReferencedClassNames, getStart, getStartToken, getString, getVariableDecl, setClassName, setClassRef, setEndToken, setJClass, setParent, setStartToken, toString
-
-
-
-
Method Detail
-
getType
public JType getType()
Returns the field type.
-
setType
public void setType(JType aType)
Sets the field type.
-
getTypeParameters
public java.util.List<JTypeParam> getTypeParameters()
Returns the method JTypeParameters.- Overrides:
getTypeParameters
in classJMemberDecl
-
setTypeParameters
public void setTypeParameters(java.util.List<JTypeParam> theTPs)
Sets the method JTypeParameters.
-
getParameters
public java.util.List<JVariableDecl> getParameters()
Returns the list of formal parameters.
-
getParametersTypes
public java.lang.Class[] getParametersTypes()
Returns the list of formal parameters.
-
getThrowsList
public java.util.List<JExpr> getThrowsList()
Returns the throws list.
-
setThrowsList
public void setThrowsList(java.util.List<JExpr> theThrows)
Sets the throws list.
-
isBlock
public boolean isBlock()
Returns whether statement has a block associated with it.
-
getBlock
public JStmtBlock getBlock()
Returns the block.
-
setBlock
public void setBlock(JStmtBlock aBlock)
Sets the block.
-
getVariableDeclInside
public JVariableDecl getVariableDeclInside(java.lang.String aName)
Returns a variable with given name.- Overrides:
getVariableDeclInside
in classJNode
-
getVariableDecls
public java.util.List<JVariableDecl> getVariableDecls(java.lang.String aPrefix, java.util.List<JVariableDecl> theVariables)
Returns a variable with given name.- Overrides:
getVariableDecls
in classJNode
-
getClassDecls
public JClassDecl[] getClassDecls()
Returns the class declarations.
-
getClassDeclsImpl
protected JClassDecl[] getClassDeclsImpl()
Returns the class declarations.
-
getSuperMemberImpl
protected java.lang.reflect.Member getSuperMemberImpl()
Returns the member that this member overrides or implements, if available.- Overrides:
getSuperMemberImpl
in classJMemberDecl
-
getNodeString
public java.lang.String getNodeString()
Returns the part name.- Overrides:
getNodeString
in classJNode
-
-