net.jangaroo.jooc.ast
Class Ide

java.lang.Object
  extended by net.jangaroo.jooc.ast.NodeImplBase
      extended by net.jangaroo.jooc.ast.Ide
All Implemented Interfaces:
AstNode, CodeGenerator
Direct Known Subclasses:
IdeWithTypeParam, NamespacedIde, QualifiedIde

public class Ide
extends NodeImplBase

Author:
Andreas Gawecki

Nested Class Summary
 
Nested classes/interfaces inherited from class net.jangaroo.jooc.ast.NodeImplBase
NodeImplBase.Scoped
 
Constructor Summary
Ide(JooSymbol ide)
           
Ide(String ide)
           
 
Method Summary
 boolean addExternalUsage()
           
 void analyzeAsExpr(AstNode exprParent, Expr parentExpr)
           
 boolean equals(Object o)
           
 void generateCodeAsExpr(JsWriter out)
           
 IdeDeclaration getDeclaration()
          callable after scoping phase
 IdeDeclaration getDeclaration(boolean errorIfUndeclared)
          callable after scoping phase
 JooSymbol getIde()
           
 IdeDeclaration getMemberDeclaration()
           
 String getName()
           
 Ide getQualified()
           
 String[] getQualifiedName()
           
 String getQualifiedNameStr()
           
 Ide getQualifier()
           
 Scope getScope()
           
 JooSymbol getSymbol()
           
 int hashCode()
           
 boolean isBound()
           
 boolean isQualified()
           
 boolean isQualifiedBySuper()
           
 boolean isQualifiedByThis()
           
 boolean isQualifier()
           
 boolean isRewriteThis()
           
 Ide qualify(JooSymbol symQualifier, JooSymbol symDot)
           
 IdeDeclaration resolveDeclaration()
          Resolve the declaration of this ide to the underlying declaration.
static IdeDeclaration resolveMember(IdeDeclaration type, Ide memberIde)
           
 void scope(Scope scope)
           
 void setBound(boolean bound)
           
 void setIde(JooSymbol ide)
           
 void setQualified(Ide qualifier)
           
 void setRewriteThis(boolean rewriteThis)
           
 String toString()
           
 void usageInExpr(AstNode exprParent)
           
 void visit(AstVisitor visitor)
           
protected  void writeBoundMethodAccess(JsWriter out, Ide optIde, JooSymbol optSymDot, IdeDeclaration decl)
           
 void writeIde(JsWriter out)
           
static void writeMemberAccess(IdeDeclaration memberDeclaration, JooSymbol optSymDot, Ide memberIde, boolean writeMemberWhitespace, JsWriter out)
           
 
Methods inherited from class net.jangaroo.jooc.ast.NodeImplBase
analyze, analyze, generate, scope, withNewDeclarationScope, withNewLabelScope
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Ide

public Ide(String ide)

Ide

public Ide(JooSymbol ide)
Method Detail

visit

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

getScope

public Scope getScope()

getIde

public JooSymbol getIde()

scope

public void scope(Scope scope)

getQualifiedName

public String[] getQualifiedName()

getQualifiedNameStr

public String getQualifiedNameStr()

getName

public String getName()

getSymbol

public JooSymbol getSymbol()

isQualifier

public boolean isQualifier()

setQualified

public void setQualified(Ide qualifier)

isQualified

public boolean isQualified()

getQualified

public Ide getQualified()

getQualifier

public Ide getQualifier()

isQualifiedByThis

public boolean isQualifiedByThis()

isQualifiedBySuper

public boolean isQualifiedBySuper()

addExternalUsage

public boolean addExternalUsage()

resolveDeclaration

public IdeDeclaration resolveDeclaration()
Resolve the declaration of this ide to the underlying declaration. callable after scoping phase

Returns:
null if the declaration cannot be resolved

getDeclaration

public IdeDeclaration getDeclaration()
callable after scoping phase

Throws:
CompilerError - if undeclared

getDeclaration

public IdeDeclaration getDeclaration(boolean errorIfUndeclared)
callable after scoping phase


qualify

public Ide qualify(JooSymbol symQualifier,
                   JooSymbol symDot)

analyzeAsExpr

public void analyzeAsExpr(AstNode exprParent,
                          Expr parentExpr)

usageInExpr

public void usageInExpr(AstNode exprParent)

getMemberDeclaration

public IdeDeclaration getMemberDeclaration()

generateCodeAsExpr

public void generateCodeAsExpr(JsWriter out)
                        throws IOException
Throws:
IOException

writeIde

public void writeIde(JsWriter out)
              throws IOException
Throws:
IOException

writeBoundMethodAccess

protected void writeBoundMethodAccess(JsWriter out,
                                      Ide optIde,
                                      JooSymbol optSymDot,
                                      IdeDeclaration decl)
                               throws IOException
Throws:
IOException

writeMemberAccess

public static void writeMemberAccess(IdeDeclaration memberDeclaration,
                                     JooSymbol optSymDot,
                                     Ide memberIde,
                                     boolean writeMemberWhitespace,
                                     JsWriter out)
                              throws IOException
Throws:
IOException

resolveMember

public static IdeDeclaration resolveMember(IdeDeclaration type,
                                           Ide memberIde)

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

setIde

public void setIde(JooSymbol ide)

isBound

public boolean isBound()

setBound

public void setBound(boolean bound)

isRewriteThis

public boolean isRewriteThis()

setRewriteThis

public void setRewriteThis(boolean rewriteThis)


Copyright © 2002-2012 CoreMedia AG. All Rights Reserved.