Package net.jangaroo.jooc.ast
Class FunctionDeclaration
-
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
-
Fields inherited from class net.jangaroo.jooc.ast.NodeImplBase
usesInstanceThis
-
-
Constructor Summary
Constructors Constructor Description FunctionDeclaration(AnnotationsAndModifiers am, JooSymbol symFunction, JooSymbol symGetOrSet, Ide ide, JooSymbol lParen, Parameters params, JooSymbol rParen, TypeRelation optTypeRelation, BlockStatement optBody, JooSymbol optSymSemicolon)
-
Method Summary
-
Methods inherited from class net.jangaroo.jooc.ast.TypedIdeDeclaration
getNamespace, getOptTypeRelation, getType, isExtConfigOrBindable, isMixinMemberRedeclaration, isPublicApi
-
Methods inherited from class net.jangaroo.jooc.ast.IdeDeclaration
getExtNamespaceRelativeTargetQualifiedNameStr, getIde, getName, getPackageDeclaration, getQualifiedName, getQualifiedNameStr, getSymbol, getTargetQualifiedNameStr, getTargetQualifiedNameStrWithoutRename, getUsages, isDeclaringCompileTimeConstant, isPrimaryDeclaration, setIde, toString, toSymbolArray
-
Methods inherited from class net.jangaroo.jooc.ast.Declaration
computeModifiers, getAnnotation, getAnnotations, getAnnotations, getClassDeclaration, getCompilationUnit, 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, isAssignmentLHS, makeChildren, notifyInstanceThisUsed, scope, usesInstanceThis, withNewDeclarationScope, withNewLabelScope
-
-
-
-
Constructor Detail
-
FunctionDeclaration
public FunctionDeclaration(AnnotationsAndModifiers am, 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:
getChildrenin interfaceAstNode- Overrides:
getChildrenin classTypedIdeDeclaration
-
visit
public void visit(AstVisitor visitor) throws IOException
- Throws:
IOException
-
getModifiers
public int getModifiers()
- Overrides:
getModifiersin classDeclaration
-
overrides
public boolean overrides()
-
isMethod
public boolean isMethod()
- Overrides:
isMethodin classIdeDeclaration
-
isWritable
public boolean isWritable()
- Overrides:
isWritablein classDeclaration
-
isGetterOrSetter
public boolean isGetterOrSetter()
-
isGetter
public boolean isGetter()
-
isSetter
public boolean isSetter()
-
getMethodType
public MethodType getMethodType()
-
isConstructor
public final boolean isConstructor()
- Overrides:
isConstructorin classIdeDeclaration
-
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:
isAbstractin classDeclaration
-
getParams
public Parameters getParams()
-
hasBody
public boolean hasBody()
-
getBody
public BlockStatement getBody()
-
scope
public void scope(Scope scope)
- Specified by:
scopein interfaceAstNode- Overrides:
scopein classTypedIdeDeclaration
-
analyze
public void analyze(AstNode parentNode)
- Specified by:
analyzein interfaceAstNode- Overrides:
analyzein classTypedIdeDeclaration
-
getMethodSignature
public FunctionSignature getMethodSignature()
-
isThisAliased
public boolean isThisAliased(boolean allowArrowFunctions)
-
propagateInstanceThisUsed
protected boolean propagateInstanceThisUsed()
- Overrides:
propagateInstanceThisUsedin classNodeImplBase
-
getAllowedModifiers
protected int getAllowedModifiers()
- Overrides:
getAllowedModifiersin classDeclaration
-
handleDuplicateDeclaration
public void handleDuplicateDeclaration(Scope scope, AstNode oldNode)
- Overrides:
handleDuplicateDeclarationin classIdeDeclaration
-
getDeclarationSymbol
public JooSymbol getDeclarationSymbol()
- Overrides:
getDeclarationSymbolin classIdeDeclaration
-
resolveDeclaration
public IdeDeclaration resolveDeclaration()
Description copied from class:IdeDeclarationResolve this declaration to the underlying Class or PredefinedType declaration- Overrides:
resolveDeclarationin classTypedIdeDeclaration- Returns:
- the declaration
-
setConstructor
public void setConstructor(boolean constructor)
-
isContainsSuperConstructorCall
public boolean isContainsSuperConstructorCall()
-
isExtConfig
public boolean isExtConfig()
- Overrides:
isExtConfigin classTypedIdeDeclaration
-
isBindable
public boolean isBindable()
- Overrides:
isBindablein classTypedIdeDeclaration
-
getSuperDeclaration
public IdeDeclaration getSuperDeclaration()
- Overrides:
getSuperDeclarationin classIdeDeclaration
-
-