Class JClassDecl
- java.lang.Object
-
- com.inductiveautomation.snap.javatree.JNode
-
- com.inductiveautomation.snap.javatree.JMemberDecl
-
- com.inductiveautomation.snap.javatree.JClassDecl
-
public class JClassDecl extends JMemberDecl
A Java member for ClassOrInterfaceDeclaration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJClassDecl.ClassType
-
Constructor Summary
Constructors Constructor Description JClassDecl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JClassDeclgetClassDecl(java.lang.String aName)Returns the class declaration for class name.JClassDecl[]getClassDecls()Returns the class constructor declarations.protected java.lang.StringgetClassNameImpl()Returns the class name.JClassDecl.ClassTypegetClassType()Returns the class type.JConstructorDeclgetConstructorDecl(java.lang.String aName, java.lang.Class[] theClasses)Returns the JConstructorDecl for given name.JConstructorDecl[]getConstructorDecls()Returns the class constructor declarations.java.util.List<JEnumConstant>getEnumConstants()Returns the list of enum constants.java.util.List<JType>getExtendsTypes()Returns the extends list.JFieldDecl[]getFieldDecls()Returns the class field declarations.java.util.List<JType>getImplementsTypes()Returns the implements list.java.lang.Class[]getInterfaces()Returns implemented interfaces.protected java.lang.Class[]getInterfacesImpl()Returns implemented interfaces.java.util.List<JMemberDecl>getMemberDecls()Returns the list of member declarations.JMethodDeclgetMethodDecl(java.lang.String aName, java.lang.Class[] theClasses)Returns the JMethodDecl for given name.JMethodDecl[]getMethodDecls()Returns the class method declarations.protected java.lang.StringgetNameImpl()Returns the simple name.java.lang.StringgetNodeString()Returns the part name.java.lang.StringgetSimpleName()Returns the simple name.java.lang.ClassgetSuperClass()Returns the superclass.JClassRefgetSuperClassRef()Returns the superclass.java.util.List<JTypeParam>getTypeParameters()Returns the 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.booleanisAnonymousClass()Returns whether class is anonymous class.booleanisInterface()Returns whether class type is Interface.voidsetClassType(JClassDecl.ClassType aType)Sets the class type.voidsetMemberDecls(java.util.List<JMemberDecl> theMDs)Sets the list of member declarations.voidsetTypeParameters(java.util.List<JTypeParam> theTPs)Sets the JTypeParameters.-
Methods inherited from class com.inductiveautomation.snap.javatree.JMemberDecl
getDeclaringClass, getIdentifier, getModifiers, getSuperMember, getSuperMemberImpl, getTypeParameter, setIdentifier, setModifiers
-
Methods inherited from class com.inductiveautomation.snap.javatree.JNode
addChild, buildChildren, getBlock, getChild, getChildCount, getChildren, getClassLoader, getClassName, 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, isBlock, setClassName, setClassRef, setEndToken, setJClass, setParent, setStartToken, toString
-
-
-
-
Method Detail
-
getSimpleName
public java.lang.String getSimpleName()
Returns the simple name.
-
getTypeParameters
public java.util.List<JTypeParam> getTypeParameters()
Returns the JTypeParameters.- Overrides:
getTypeParametersin classJMemberDecl
-
setTypeParameters
public void setTypeParameters(java.util.List<JTypeParam> theTPs)
Sets the JTypeParameters.
-
getExtendsTypes
public java.util.List<JType> getExtendsTypes()
Returns the extends list.
-
getImplementsTypes
public java.util.List<JType> getImplementsTypes()
Returns the implements list.
-
getEnumConstants
public java.util.List<JEnumConstant> getEnumConstants()
Returns the list of enum constants.
-
getNameImpl
@Nullable protected java.lang.String getNameImpl()
Returns the simple name.- Overrides:
getNameImplin classJMemberDecl
-
getClassNameImpl
protected java.lang.String getClassNameImpl()
Returns the class name.- Overrides:
getClassNameImplin classJNode
-
getSuperClassRef
public JClassRef getSuperClassRef()
Returns the superclass.
-
getSuperClass
@Nullable public java.lang.Class getSuperClass()
Returns the superclass.
-
getInterfaces
public java.lang.Class[] getInterfaces()
Returns implemented interfaces.
-
getInterfacesImpl
protected java.lang.Class[] getInterfacesImpl()
Returns implemented interfaces.
-
getClassType
public JClassDecl.ClassType getClassType()
Returns the class type.
-
setClassType
public void setClassType(JClassDecl.ClassType aType)
Sets the class type.
-
isInterface
public boolean isInterface()
Returns whether class type is Interface.
-
isAnonymousClass
public boolean isAnonymousClass()
Returns whether class is anonymous class.
-
getMemberDecls
public java.util.List<JMemberDecl> getMemberDecls()
Returns the list of member declarations.
-
setMemberDecls
public void setMemberDecls(java.util.List<JMemberDecl> theMDs)
Sets the list of member declarations.
-
getFieldDecls
public JFieldDecl[] getFieldDecls()
Returns the class field declarations.
-
getMethodDecls
public JMethodDecl[] getMethodDecls()
Returns the class method declarations.
-
getMethodDecl
public JMethodDecl getMethodDecl(java.lang.String aName, java.lang.Class[] theClasses)
Returns the JMethodDecl for given name.
-
getConstructorDecls
public JConstructorDecl[] getConstructorDecls()
Returns the class constructor declarations.
-
getConstructorDecl
public JConstructorDecl getConstructorDecl(java.lang.String aName, java.lang.Class[] theClasses)
Returns the JConstructorDecl for given name.
-
getClassDecl
public JClassDecl getClassDecl(java.lang.String aName)
Returns the class declaration for class name.
-
getClassDecls
public JClassDecl[] getClassDecls()
Returns the class constructor declarations.
-
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
-
getNodeString
public java.lang.String getNodeString()
Returns the part name.- Overrides:
getNodeStringin classJNode
-
-