Package net.jangaroo.jooc.ast
Class ClassDeclaration
-
- All Implemented Interfaces:
AstNode
public class ClassDeclaration extends TypeDeclaration
- Author:
- Andreas Gawecki, Frank Wienberg
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.jangaroo.jooc.ast.NodeImplBase
NodeImplBase.Scoped
-
-
Field Summary
-
Fields inherited from class net.jangaroo.jooc.ast.Declaration
MODIFIER_ABSTRACT, MODIFIER_DYNAMIC, MODIFIER_FINAL, MODIFIER_INTERNAL, MODIFIER_NAMESPACE, MODIFIER_NATIVE, MODIFIER_OVERRIDE, MODIFIER_PRIVATE, MODIFIER_PROTECTED, MODIFIER_PUBLIC, MODIFIER_STATIC, MODIFIER_VIRTUAL, MODIFIERS_SCOPE
-
Fields inherited from class net.jangaroo.jooc.ast.NodeImplBase
usesInstanceThis
-
-
Constructor Summary
Constructors Constructor Description ClassDeclaration(AnnotationsAndModifiers am, JooSymbol cls, Ide ide, Extends ext, Implements impl, ClassBody body)
-
Method Summary
-
Methods inherited from class net.jangaroo.jooc.ast.TypeDeclaration
resolvePropertyDeclaration
-
Methods inherited from class net.jangaroo.jooc.ast.IdeDeclaration
getExtNamespaceRelativeTargetQualifiedNameStr, getIde, getPackageDeclaration, getQualifiedName, getQualifiedNameStr, getSuperDeclaration, getSymbol, getTargetQualifiedNameStrWithoutRename, getType, getUsages, isConstructor, isDeclaringCompileTimeConstant, isMethod, isPrimaryDeclaration, setIde, toString, toSymbolArray
-
Methods inherited from class net.jangaroo.jooc.ast.Declaration
computeModifiers, getAnnotation, getAnnotations, getAnnotations, getClassDeclaration, getCompilationUnit, getModifierFlag, getModifiers, getParentDeclaration, getSymInheritedModifiers, getSymModifiers, isDynamic, isFinal, isNative, isOverride, isPrivateStatic, isProtected, isPublic, isPublicApi, isWritable, setClassDeclaration, setInheritedModifiers, setParentDeclaration, setSymInheritedModifiers
-
Methods inherited from class net.jangaroo.jooc.ast.Directive
setClassMember
-
Methods inherited from class net.jangaroo.jooc.ast.NodeImplBase
analyze, getParentNode, isAssignmentLHS, makeChildren, notifyInstanceThisUsed, propagateInstanceThisUsed, scope, usesInstanceThis, withNewDeclarationScope, withNewLabelScope
-
-
-
-
Constructor Detail
-
ClassDeclaration
public ClassDeclaration(AnnotationsAndModifiers am, JooSymbol cls, Ide ide, Extends ext, Implements impl, ClassBody body)
-
-
Method Detail
-
getChildren
public List<? extends AstNode> getChildren()
- Specified by:
getChildrenin interfaceAstNode- Overrides:
getChildrenin classIdeDeclaration
-
getDeclarationSymbol
public JooSymbol getDeclarationSymbol()
- Overrides:
getDeclarationSymbolin classIdeDeclaration
-
getConstructor
public FunctionDeclaration getConstructor()
-
visit
public void visit(AstVisitor visitor) throws IOException
- Throws:
IOException
-
getAllowedModifiers
protected int getAllowedModifiers()
- Overrides:
getAllowedModifiersin classDeclaration
-
isInterface
public boolean isInterface()
-
isAbstract
public boolean isAbstract()
- Overrides:
isAbstractin classDeclaration
-
isStatic
public boolean isStatic()
- Overrides:
isStaticin classDeclaration
-
isClassMember
public boolean isClassMember()
- Overrides:
isClassMemberin classDirective
-
isPrivate
public boolean isPrivate()
- Overrides:
isPrivatein classDeclaration
-
getName
public String getName()
- Overrides:
getNamein classIdeDeclaration
-
setConstructor
public void setConstructor(FunctionDeclaration methodDeclaration)
-
getSymClass
public JooSymbol getSymClass()
-
getOptExtends
public Extends getOptExtends()
-
getOptImplements
public Implements getOptImplements()
-
getFieldsWithInitializer
public List<VariableDeclaration> getFieldsWithInitializer()
-
getBody
public ClassBody getBody()
-
getSecondaryDeclarations
public List<IdeDeclaration> getSecondaryDeclarations()
-
getStaticMembers
public Map<String,TypedIdeDeclaration> getStaticMembers()
-
scope
public void scope(Scope scope)
- Specified by:
scopein interfaceAstNode- Overrides:
scopein classIdeDeclaration
-
handleDuplicateDeclaration
public void handleDuplicateDeclaration(Scope scope, AstNode oldNode)
- Overrides:
handleDuplicateDeclarationin classIdeDeclaration
-
implementsMoreThanOneInterface
public boolean implementsMoreThanOneInterface()
-
analyze
public void analyze(AstNode parentNode)
- Specified by:
analyzein interfaceAstNode- Overrides:
analyzein classIdeDeclaration
-
registerMember
public void registerMember(TypedIdeDeclaration memberDeclaration)
-
getMemberDeclaration
public TypedIdeDeclaration getMemberDeclaration(String memberName)
- Specified by:
getMemberDeclarationin classTypeDeclaration
-
getMembers
public Collection<TypedIdeDeclaration> getMembers()
-
getMethods
public Collection<FunctionDeclaration> getMethods()
-
getStaticMemberDeclaration
public TypedIdeDeclaration getStaticMemberDeclaration(String memberName)
- Specified by:
getStaticMemberDeclarationin classTypeDeclaration
-
isMixin
public boolean isMixin()
-
getMyMixinInterface
public ClassDeclaration getMyMixinInterface()
-
getConfigClassDeclaration
public ClassDeclaration getConfigClassDeclaration()
-
inheritsFromExtBaseExplicitly
public boolean inheritsFromExtBaseExplicitly()
-
inheritsFromFlExtEvent
public boolean inheritsFromFlExtEvent()
-
getConstructorConfigParameterType
public TypeRelation getConstructorConfigParameterType()
-
hasConfigClass
public boolean hasConfigClass()
-
isSubclassOf
public boolean isSubclassOf(ClassDeclaration classDeclaration)
-
isJavaScriptObject
public boolean isJavaScriptObject()
-
getThisType
public Type getThisType()
-
getSuperType
public Type getSuperType()
-
setSecondaryDeclarations
public void setSecondaryDeclarations(List<IdeDeclaration> secondaryDeclarations)
-
resolveDeclaration
public IdeDeclaration resolveDeclaration()
Description copied from class:IdeDeclarationResolve this declaration to the underlying Class or PredefinedType declaration- Overrides:
resolveDeclarationin classIdeDeclaration- Returns:
- the declaration
-
resolvePropertyDeclaration
public IdeDeclaration resolvePropertyDeclaration(String ide, boolean isStatic)
- Overrides:
resolvePropertyDeclarationin classTypeDeclaration
-
isAssignableTo
public boolean isAssignableTo(ClassDeclaration classToCheck)
-
notExtendsObject
public boolean notExtendsObject()
-
getQualifiedNameHash
public String getQualifiedNameHash()
-
getSuperTypeDeclaration
public ClassDeclaration getSuperTypeDeclaration()
- Specified by:
getSuperTypeDeclarationin classTypeDeclaration
-
getSuperTypeDeclarations
public List<ClassDeclaration> getSuperTypeDeclarations()
-
isPropertiesClass
public boolean isPropertiesClass()
-
isPropertiesSubclass
public boolean isPropertiesSubclass()
-
getTargetQualifiedNameStr
public String getTargetQualifiedNameStr()
- Overrides:
getTargetQualifiedNameStrin classIdeDeclaration
-
addFieldWithInitializer
public void addFieldWithInitializer(VariableDeclaration fieldDeclaration)
-
isObject
public boolean isObject()
-
-