net.jangaroo.jooc.ast
Class CompilationUnit

java.lang.Object
  extended by net.jangaroo.jooc.ast.NodeImplBase
      extended by net.jangaroo.jooc.ast.CompilationUnit
All Implemented Interfaces:
AstNode

public class CompilationUnit
extends NodeImplBase

Author:
Andreas Gawecki, Frank Wienberg

Nested Class Summary
 
Nested classes/interfaces inherited from class net.jangaroo.jooc.ast.NodeImplBase
NodeImplBase.Scoped
 
Constructor Summary
CompilationUnit(PackageDeclaration packageDeclaration, JooSymbol lBrace, List<AstNode> directives, IdeDeclaration primaryDeclaration, JooSymbol rBrace, List<IdeDeclaration> secondaryDeclarations)
           
 
Method Summary
 void addBuiltInUsage(String builtIn)
           
 void addDependency(CompilationUnit otherUnit)
           
 void addPublicApiDependency(CompilationUnit otherUnit)
           
 String addResourceDependency(String relativePath)
          Add a dependency to a resource at the given path, which is relative to this compilation unit's file.
 void analyze(AstNode parentNode)
           
 Annotation getAnnotation(String name)
           
 Map<String,String> getAuxVarDeclarations()
           
 String getAuxVarForPackage(Scope lookupScope, String packageQName)
           
 String getAuxVarForPackage(String packageQName)
           
 List<? extends AstNode> getChildren()
           
 JangarooParser getCompiler()
           
 Set<String> getDependencies()
           
 Set<CompilationUnit> getDependenciesAsCompilationUnits()
           
 List<AstNode> getDirectives()
           
 JooSymbol getLBrace()
           
 PackageDeclaration getPackageDeclaration()
           
 IdeDeclaration getPrimaryDeclaration()
           
 Set<String> getPublicApiDependencies()
           
 JooSymbol getRBrace()
           
 InputSource getSource()
           
 JooSymbol getSymbol()
           
 void scope(Scope scope)
           
 void setCompiler(JangarooParser compiler)
           
 void setSource(InputSource source)
           
 String toString()
           
 void visit(AstVisitor visitor)
           
 
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

CompilationUnit

public CompilationUnit(PackageDeclaration packageDeclaration,
                       JooSymbol lBrace,
                       List<AstNode> directives,
                       IdeDeclaration primaryDeclaration,
                       JooSymbol rBrace,
                       List<IdeDeclaration> secondaryDeclarations)
Method Detail

getChildren

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

getDirectives

public List<AstNode> getDirectives()

addBuiltInUsage

public void addBuiltInUsage(String builtIn)

getAuxVarForPackage

public String getAuxVarForPackage(String packageQName)

getAuxVarForPackage

public String getAuxVarForPackage(Scope lookupScope,
                                  String packageQName)

getAuxVarDeclarations

public Map<String,String> getAuxVarDeclarations()

visit

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

scope

public void scope(Scope scope)

getPackageDeclaration

public PackageDeclaration getPackageDeclaration()

getPrimaryDeclaration

public IdeDeclaration getPrimaryDeclaration()

getLBrace

public JooSymbol getLBrace()

getRBrace

public JooSymbol getRBrace()

getDependencies

public Set<String> getDependencies()

getPublicApiDependencies

public Set<String> getPublicApiDependencies()

getDependenciesAsCompilationUnits

public Set<CompilationUnit> getDependenciesAsCompilationUnits()

getCompiler

public JangarooParser getCompiler()

setCompiler

public void setCompiler(JangarooParser compiler)

setSource

public void setSource(InputSource source)
Parameters:
source - the source of this compilation unit.

getSource

public InputSource getSource()

analyze

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

getAnnotation

public Annotation getAnnotation(String name)

getSymbol

public JooSymbol getSymbol()

addDependency

public void addDependency(CompilationUnit otherUnit)

addPublicApiDependency

public void addPublicApiDependency(CompilationUnit otherUnit)

addResourceDependency

public String addResourceDependency(String relativePath)
Add a dependency to a resource at the given path, which is relative to this compilation unit's file.

Parameters:
relativePath - relative path of the dependency
Returns:
the path relative to the source directory

toString

public String toString()
Overrides:
toString in class Object


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