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