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 JStmtBlockgetBlock()Returns the block.JClassDecl[]getClassDecls()Returns the class declarations.protected JClassDecl[]getClassDeclsImpl()Returns the class declarations.java.lang.StringgetNodeString()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.MembergetSuperMemberImpl()Returns the member that this member overrides or implements, if available.java.util.List<JExpr>getThrowsList()Returns the throws list.JTypegetType()Returns the field type.java.util.List<JTypeParam>getTypeParameters()Returns the method JTypeParameters.JVariableDeclgetVariableDeclInside(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.booleanisBlock()Returns whether statement has a block associated with it.voidsetBlock(JStmtBlock aBlock)Sets the block.voidsetThrowsList(java.util.List<JExpr> theThrows)Sets the throws list.voidsetType(JType aType)Sets the field type.voidsetTypeParameters(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:
getTypeParametersin 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:
getVariableDeclInsidein classJNode
-
getVariableDecls
public java.util.List<JVariableDecl> getVariableDecls(java.lang.String aPrefix, java.util.List<JVariableDecl> theVariables)
Returns a variable with given name.- Overrides:
getVariableDeclsin 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:
getSuperMemberImplin classJMemberDecl
-
getNodeString
public java.lang.String getNodeString()
Returns the part name.- Overrides:
getNodeStringin classJNode
-
-