|
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.literal.LiteralFactory
public class LiteralFactory
The literal factory provides a LiteralValue for the specified object (if possible).
Constructor Summary | |
---|---|
LiteralFactory()
|
Method Summary | |
---|---|
static LiteralValue<?> |
getLiteral(Context context,
Object o)
Returns a literal value (specialization of Statement) representing the given object in the given context. |
static LiteralValue<?> |
getLiteral(Object o)
Returns a literal value (specialization of Statement) representing the given object in the given context. |
static LiteralValue<?> |
isLiteral(Object o)
Returns a literal value (specialization of Statement) representing the given object in the given context, or null if the value is not literalizable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LiteralFactory()
Method Detail |
---|
public static LiteralValue<?> getLiteral(Object o)
o
- The object to create a literal value for.
NotLiteralizableException
- if o
cannot be literalizedpublic static LiteralValue<?> getLiteral(Context context, Object o)
context
- The context the literal value will be code-generated in. Contexts
can specify additional literalizable types. See Context.addLiteralizableClass(Class)
.o
- The object to create a literal value for.
NotLiteralizableException
- if o
cannot be literalizedpublic static LiteralValue<?> isLiteral(Object o)
o
- The object to create a literal value for.
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |