net.jangaroo.jooc
Class ClassDeclaration
java.lang.Object
net.jangaroo.jooc.NodeImplBase
net.jangaroo.jooc.IdeDeclaration
net.jangaroo.jooc.ClassDeclaration
public class ClassDeclaration
- extends IdeDeclaration
- Author:
- Andreas Gawecki, Frank Wienberg
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
symClass
protected JooSymbol symClass
optExtends
protected Extends optExtends
optImplements
protected net.jangaroo.jooc.Implements optImplements
symModifiers
protected JooSymbol[] symModifiers
symInheritedModifiers
protected JooSymbol[] symInheritedModifiers
parentDeclaration
protected net.jangaroo.jooc.AstNode parentDeclaration
classDeclaration
protected ClassDeclaration classDeclaration
allowedModifiers
protected int allowedModifiers
MODIFIER_PUBLIC
protected static final int MODIFIER_PUBLIC
- See Also:
- Constant Field Values
MODIFIER_PROTECTED
protected static final int MODIFIER_PROTECTED
- See Also:
- Constant Field Values
MODIFIER_PRIVATE
protected static final int MODIFIER_PRIVATE
- See Also:
- Constant Field Values
MODIFIER_INTERNAL
protected static final int MODIFIER_INTERNAL
- See Also:
- Constant Field Values
MODIFIER_STATIC
protected static final int MODIFIER_STATIC
- See Also:
- Constant Field Values
MODIFIER_ABSTRACT
protected static final int MODIFIER_ABSTRACT
- See Also:
- Constant Field Values
MODIFIER_FINAL
protected static final int MODIFIER_FINAL
- See Also:
- Constant Field Values
MODIFIER_OVERRIDE
protected static final int MODIFIER_OVERRIDE
- See Also:
- Constant Field Values
MODIFIER_DYNAMIC
protected static final int MODIFIER_DYNAMIC
- See Also:
- Constant Field Values
MODIFIER_NAMESPACE
protected static final int MODIFIER_NAMESPACE
- See Also:
- Constant Field Values
MODIFIER_NATIVE
protected static final int MODIFIER_NATIVE
- See Also:
- Constant Field Values
MODIFIER_VIRTUAL
protected static final int MODIFIER_VIRTUAL
- See Also:
- Constant Field Values
MODIFIERS_SCOPE
protected static final int MODIFIERS_SCOPE
- See Also:
- Constant Field Values
ClassDeclaration
public ClassDeclaration(java.util.List<net.jangaroo.jooc.AstNode> directives,
JooSymbol[] modifiers,
JooSymbol cls,
Ide ide,
Extends ext,
net.jangaroo.jooc.Implements impl,
ClassBody body)
getOptExtends
public Extends getOptExtends()
getBody
public ClassBody getBody()
getConstructor
public FunctionDeclaration getConstructor()
getConstructorDeclaration
public FunctionDeclaration getConstructorDeclaration()
isInterface
public boolean isInterface()
isAbstract
public boolean isAbstract()
isStatic
public boolean isStatic()
isClassMember
public boolean isClassMember()
- Overrides:
isClassMember in class IdeDeclaration
getName
public java.lang.String getName()
- Overrides:
getName in class IdeDeclaration
setConstructor
public void setConstructor(FunctionDeclaration methodDeclaration)
generateAsApiCode
protected void generateAsApiCode(JsWriter out)
throws java.io.IOException
- Description copied from class:
NodeImplBase
- Default implementation generates same code as JS. Overwritten where this must differ.
- Overrides:
generateAsApiCode in class NodeImplBase
- Throws:
java.io.IOException
generateJsCode
protected void generateJsCode(JsWriter out)
throws java.io.IOException
- Specified by:
generateJsCode in class NodeImplBase
- Throws:
java.io.IOException
scope
public void scope(Scope scope)
- Overrides:
scope in class IdeDeclaration
analyze
public net.jangaroo.jooc.AstNode analyze(net.jangaroo.jooc.AstNode parentNode,
AnalyzeContext context)
- Overrides:
analyze in class NodeImplBase
registerMember
public void registerMember(TypedIdeDeclaration memberDeclaration)
getMemberDeclaration
public TypedIdeDeclaration getMemberDeclaration(java.lang.String memberName)
getStaticMemberDeclaration
public TypedIdeDeclaration getStaticMemberDeclaration(java.lang.String memberName)
addInitIfClass
public void addInitIfClass(Ide ide)
isSubclassOf
public boolean isSubclassOf(ClassDeclaration classDeclaration)
getThisType
public Type getThisType()
getSuperType
public Type getSuperType()
setSecondaryDeclarations
public void setSecondaryDeclarations(java.util.List<IdeDeclaration> secondaryDeclarations)
resolveDeclaration
public IdeDeclaration resolveDeclaration()
- Description copied from class:
IdeDeclaration
- Resolve this declaration to the underlying Class or PredefinedType declaration
- Overrides:
resolveDeclaration in class IdeDeclaration
resolvePropertyDeclaration
public IdeDeclaration resolvePropertyDeclaration(java.lang.String ide)
- Lookup a non-static member of the given name
- Overrides:
resolvePropertyDeclaration in class IdeDeclaration
- Parameters:
ide - the member name
- Returns:
- a non-static member if found, null otherwise
getSuperTypeDeclaration
public ClassDeclaration getSuperTypeDeclaration()
addFieldWithInitializer
public void addFieldWithInitializer(FieldDeclaration fieldDeclaration)
generateFieldInitCode
public void generateFieldInitCode(JsWriter out)
throws java.io.IOException
- Throws:
java.io.IOException
getSymModifiers
public JooSymbol[] getSymModifiers()
getParentDeclaration
public net.jangaroo.jooc.AstNode getParentDeclaration()
getClassDeclaration
public ClassDeclaration getClassDeclaration()
setInheritedModifiers
protected void setInheritedModifiers(JooSymbol[] modifiers)
computeModifiers
protected void computeModifiers()
getModifierFlag
protected int getModifierFlag(JooSymbol modifier)
getModifiers
protected int getModifiers()
isPublic
public boolean isPublic()
isProtected
public boolean isProtected()
isPrivate
public boolean isPrivate()
isOverride
public boolean isOverride()
isPrivateStatic
public boolean isPrivateStatic()
isFinal
public boolean isFinal()
isNative
public boolean isNative()
writeModifiers
protected void writeModifiers(JsWriter out)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2002-2010 CoreMedia AG. All Rights Reserved.