net.jangaroo.jooc.ast
Class FunctionDeclaration

java.lang.Object
  extended by net.jangaroo.jooc.ast.NodeImplBase
      extended by net.jangaroo.jooc.ast.Directive
          extended by net.jangaroo.jooc.ast.Statement
              extended by net.jangaroo.jooc.ast.Declaration
                  extended by net.jangaroo.jooc.ast.IdeDeclaration
                      extended by net.jangaroo.jooc.ast.TypedIdeDeclaration
                          extended by net.jangaroo.jooc.ast.FunctionDeclaration
All Implemented Interfaces:
AstNode

public class FunctionDeclaration
extends TypedIdeDeclaration

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
 
Constructor Summary
FunctionDeclaration(List<JooSymbol> modifiers, JooSymbol symFunction, JooSymbol symGetOrSet, Ide ide, JooSymbol lParen, Parameters params, JooSymbol rParen, TypeRelation optTypeRelation, BlockStatement optBody, JooSymbol optSymSemicolon)
           
 
Method Summary
 void analyze(AstNode parentNode)
           
 boolean containsSuperConstructorCall()
           
protected  int getAllowedModifiers()
           
 BlockStatement getBody()
           
 List<? extends AstNode> getChildren()
           
 FunctionExpr getFun()
           
 int getModifiers()
           
 JooSymbol getOptSymSemicolon()
           
 Parameters getParams()
           
 JooSymbol getSymbol()
           
 JooSymbol getSymGetOrSet()
           
 void handleDuplicateDeclaration(Scope scope, AstNode oldNode)
           
 boolean hasBody()
           
 boolean isAbstract()
           
 boolean isConstructor()
           
 boolean isContainsSuperConstructorCall()
           
 boolean isGetter()
           
 boolean isGetterOrSetter()
           
 boolean isMethod()
           
 boolean isSetter()
           
 boolean isThisAliased()
           
 boolean overrides()
           
 IdeDeclaration resolveDeclaration()
          Resolve this declaration to the underlying Class or PredefinedType declaration
 void scope(Scope scope)
           
 void setConstructor(boolean constructor)
           
 void setContainsSuperConstructorCall(boolean containsSuperConstructorCallStatement)
           
 void visit(AstVisitor visitor)
           
 
Methods inherited from class net.jangaroo.jooc.ast.TypedIdeDeclaration
addPublicApiDependencyOn, getName, getNamespace, getOptTypeRelation, isPublicApi
 
Methods inherited from class net.jangaroo.jooc.ast.IdeDeclaration
getIde, getPackageDeclaration, getQualifiedName, getQualifiedNameStr, isDeclaringCompileTimeConstant, isPrimaryDeclaration, resolvePropertyDeclaration, setIde, toString
 
Methods inherited from class net.jangaroo.jooc.ast.Declaration
computeModifiers, getClassDeclaration, getModifierFlag, getParentDeclaration, getSymInheritedModifiers, getSymModifiers, isDynamic, isFinal, isNative, isOverride, isPrivate, isPrivateStatic, isProtected, isPublic, isStatic, setClassDeclaration, setInheritedModifiers, setParentDeclaration, setSymInheritedModifiers
 
Methods inherited from class net.jangaroo.jooc.ast.Directive
isClassMember, setClassMember
 
Methods inherited from class net.jangaroo.jooc.ast.NodeImplBase
analyze, getParentNode, makeChildren, scope, withNewDeclarationScope, withNewLabelScope
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FunctionDeclaration

public FunctionDeclaration(List<JooSymbol> modifiers,
                           JooSymbol symFunction,
                           JooSymbol symGetOrSet,
                           Ide ide,
                           JooSymbol lParen,
                           Parameters params,
                           JooSymbol rParen,
                           TypeRelation optTypeRelation,
                           BlockStatement optBody,
                           JooSymbol optSymSemicolon)
Method Detail

getChildren

public List<? extends AstNode> getChildren()
Specified by:
getChildren in interface AstNode
Overrides:
getChildren in class TypedIdeDeclaration

visit

public void visit(AstVisitor visitor)
           throws IOException
Throws:
IOException

getModifiers

public int getModifiers()
Overrides:
getModifiers in class Declaration

overrides

public boolean overrides()

isMethod

public boolean isMethod()
Overrides:
isMethod in class IdeDeclaration

isGetterOrSetter

public boolean isGetterOrSetter()

isGetter

public boolean isGetter()

isSetter

public boolean isSetter()

isConstructor

public final boolean isConstructor()
Overrides:
isConstructor in class IdeDeclaration

getFun

public FunctionExpr getFun()

getSymGetOrSet

public JooSymbol getSymGetOrSet()

getOptSymSemicolon

public JooSymbol getOptSymSemicolon()

containsSuperConstructorCall

public boolean containsSuperConstructorCall()

setContainsSuperConstructorCall

public void setContainsSuperConstructorCall(boolean containsSuperConstructorCallStatement)

isAbstract

public boolean isAbstract()
Overrides:
isAbstract in class Declaration

getParams

public Parameters getParams()

hasBody

public boolean hasBody()

getBody

public BlockStatement getBody()

scope

public void scope(Scope scope)
Specified by:
scope in interface AstNode
Overrides:
scope in class TypedIdeDeclaration

analyze

public void analyze(AstNode parentNode)
Specified by:
analyze in interface AstNode
Overrides:
analyze in class TypedIdeDeclaration

isThisAliased

public boolean isThisAliased()

getAllowedModifiers

protected int getAllowedModifiers()
Overrides:
getAllowedModifiers in class Declaration

handleDuplicateDeclaration

public void handleDuplicateDeclaration(Scope scope,
                                       AstNode oldNode)
Overrides:
handleDuplicateDeclaration in class IdeDeclaration

getSymbol

public JooSymbol getSymbol()
Specified by:
getSymbol in interface AstNode
Overrides:
getSymbol in class IdeDeclaration

resolveDeclaration

public IdeDeclaration resolveDeclaration()
Description copied from class: IdeDeclaration
Resolve this declaration to the underlying Class or PredefinedType declaration

Overrides:
resolveDeclaration in class TypedIdeDeclaration
Returns:
the declaration

setConstructor

public void setConstructor(boolean constructor)

isContainsSuperConstructorCall

public boolean isContainsSuperConstructorCall()


Copyright © 2002–2014 CoreMedia AG. All rights reserved.