net.jangaroo.jooc.ast
Class CompilationUnit
java.lang.Object
net.jangaroo.jooc.ast.NodeImplBase
net.jangaroo.jooc.ast.CompilationUnit
- All Implemented Interfaces:
- AstNode
public class CompilationUnit
- extends NodeImplBase
- Author:
- Andreas Gawecki, Frank Wienberg
CompilationUnit
public CompilationUnit(PackageDeclaration packageDeclaration,
JooSymbol lBrace,
List<AstNode> directives,
IdeDeclaration primaryDeclaration,
JooSymbol rBrace,
List<IdeDeclaration> secondaryDeclarations)
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.