|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.errai.codegen.AbstractStatement
org.jboss.errai.codegen.Variable
public class Variable
This class represents a variable.
Note that initialization using LiteralValue
s takes effect immediately,
initialization using Statement
s needs to be deferred to generation time.
Method Summary | |
---|---|
static Variable |
create(String name,
Class<?> type)
Creates a variable, but does not assign it to a scope. |
static Variable |
create(String name,
Class<?> type,
Object initialization)
Creates a variable, but does not assign it to a scope. |
static Variable |
create(String name,
MetaClass type)
Creates a variable, but does not assign it to a scope. |
static Variable |
create(String name,
MetaClass type,
Object initialization)
Creates a variable, but does not assign it to a scope. |
static Variable |
create(String name,
Object initialization)
Creates a variable, but does not assign it to a scope. |
static Variable |
create(String name,
javax.enterprise.util.TypeLiteral<?> type)
Creates a variable, but does not assign it to a scope. |
static Variable |
create(String name,
javax.enterprise.util.TypeLiteral<?> type,
Object initialization)
Creates a variable, but does not assign it to a scope. |
static Variable |
createFinal(String name,
Class<?> type)
Creates a variable, but does not assign it to a scope. |
static Variable |
createFinal(String name,
Class<?> type,
Object initialization)
Creates a variable, but does not assign it to a scope. |
static Variable |
createFinal(String name,
MetaClass type)
Creates a variable, but does not assign it to a scope. |
static Variable |
createFinal(String name,
MetaClass type,
Object initialization)
Creates a variable, but does not assign it to a scope. |
static Variable |
createFinal(String name,
javax.enterprise.util.TypeLiteral<?> type)
Creates a variable, but does not assign it to a scope. |
static Variable |
createFinal(String name,
javax.enterprise.util.TypeLiteral<?> type,
Object initialization)
Creates a variable, but does not assign it to a scope. |
boolean |
equals(Object o)
|
static Variable |
from(VariableReference ref)
|
String |
generate(Context context)
|
static VariableReference |
get(String name)
|
String |
getName()
|
VariableReference |
getReference()
|
MetaClass |
getType()
|
Statement |
getValue()
|
int |
hashCode()
|
void |
initialize(Object initializationValue)
|
boolean |
isFinal()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void initialize(Object initializationValue)
public static Variable createFinal(String name, Class<?> type)
Stmt.declareFinalVariable(String, Class)
.
name
- The variable nametype
- The variable reference type
public static Variable createFinal(String name, javax.enterprise.util.TypeLiteral<?> type)
Stmt.declareFinalVariable(String, TypeLiteral)
.
name
- The variable nametype
- The variable reference type
public static Variable createFinal(String name, MetaClass type)
Stmt#declareFinalVariable(String, MetaClass)
.
name
- The variable nametype
- The variable reference type
public static Variable createFinal(String name, Class<?> type, Object initialization)
Stmt.declareFinalVariable(String, Class, Object)
.
name
- The variable nametype
- The variable reference type
public static Variable createFinal(String name, MetaClass type, Object initialization)
Stmt.declareFinalVariable(String, MetaClass, Object)
.
name
- The variable nametype
- The variable reference type
public static Variable createFinal(String name, javax.enterprise.util.TypeLiteral<?> type, Object initialization)
Stmt.declareFinalVariable(String, TypeLiteral, Object)
.
name
- The variable nametype
- The variable reference type
public static Variable create(String name, Object initialization)
Stmt.declareVariable(String, Object)
.
name
- The variable nametype
- The variable reference type
public static Variable from(VariableReference ref)
public static Variable create(String name, Class<?> type)
Stmt.declareVariable(String, Class)
.
name
- The variable nametype
- The variable reference type
public static Variable create(String name, javax.enterprise.util.TypeLiteral<?> type)
Stmt.declareVariable(String, TypeLiteral)
.
name
- The variable nametype
- The variable reference type
public static Variable create(String name, MetaClass type)
Stmt#declareVariable(String, MetaClass)
.
name
- The variable nametype
- The variable reference type
public static Variable create(String name, Class<?> type, Object initialization)
Stmt.declareVariable(String, Class, Object)
.
name
- The variable nametype
- The variable reference type
public static Variable create(String name, javax.enterprise.util.TypeLiteral<?> type, Object initialization)
Stmt.declareVariable(String, TypeLiteral, Object)
.
name
- The variable nametype
- The variable reference type
public static Variable create(String name, MetaClass type, Object initialization)
Stmt.declareVariable(String, MetaClass, Object)
.
name
- The variable nametype
- The variable reference type
public static VariableReference get(String name)
public VariableReference getReference()
public String getName()
public MetaClass getType()
getType
in interface Statement
getType
in class AbstractStatement
public Statement getValue()
public boolean isFinal()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public String generate(Context context)
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |