org.jboss.errai.ioc.rebind.ioc.codegen
Class Context
java.lang.Object
org.jboss.errai.ioc.rebind.ioc.codegen.Context
public class Context
- extends Object
This class represents a context in which Statements are generated.
It references its parent context and holds a map of variables to represent
a Statement's scope. It further supports importing classes and packages
to avoid the use of fully qualified class names.
- Author:
- Christian Sadilek
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
create
public static Context create()
create
public static Context create(Context parent)
addVariable
public Context addVariable(String name,
Class<?> type)
addVariable
public Context addVariable(String name,
javax.enterprise.util.TypeLiteral<?> type)
addVariable
public Context addVariable(String name,
Object initialization)
addVariable
public Context addVariable(String name,
Class<?> type,
Object initialization)
addVariable
public Context addVariable(String name,
javax.enterprise.util.TypeLiteral<?> type,
Object initialization)
addVariable
public Context addVariable(Variable variable)
addLabel
public Context addLabel(Label label)
addPackageImport
public Context addPackageImport(String packageName)
hasPackageImport
public boolean hasPackageImport(String packageName)
addClassImport
public Context addClassImport(MetaClass clazz)
hasClassImport
public boolean hasClassImport(MetaClass clazz)
autoImport
public Context autoImport()
getVariable
public VariableReference getVariable(String name)
getClassMember
public VariableReference getClassMember(String name)
getLabel
public LabelReference getLabel(String name)
isScoped
public boolean isScoped(Variable variable)
getDeclaredVariables
public Collection<Variable> getDeclaredVariables()
getVariables
public Map<String,Variable> getVariables()
getImportedPackages
public Set<String> getImportedPackages()
getImportedClasses
public Set<String> getImportedClasses()
isAutoImports
public boolean isAutoImports()
Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.