Class JavaFactoryConstant<T>
java.lang.Object
io.github.mmm.code.base.item.BaseItem
io.github.mmm.code.base.expression.BaseExpression
io.github.mmm.code.impl.java.expression.constant.JavaConstant<T>
io.github.mmm.code.impl.java.expression.constant.JavaFactoryConstant<T>
- Type Parameters:
T- type ofvalue.
- All Implemented Interfaces:
io.github.mmm.code.api.expression.CodeConstant,io.github.mmm.code.api.expression.CodeExpression,io.github.mmm.code.api.item.CodeItem,JavaExpression
- Direct Known Subclasses:
JavaConstantBoolean,JavaConstantByte,JavaConstantCharacter,JavaConstantDouble,JavaConstantFloat,JavaConstantInteger,JavaConstantLong,JavaConstantShort
Implementation of
JavaConstant using a standard factory method such as
Integer.valueOf(int).- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
Field Summary
Fields inherited from interface io.github.mmm.code.api.item.CodeItem
DEFAULT_INDENT, DEFAULT_NEWLINE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.github.mmm.code.impl.java.expression.constant.JavaConstant
doWrite, evaluate, getJavaClass, getSourceCode, getValue, isPrimitive, of, withValueMethods inherited from class io.github.mmm.code.base.item.BaseItem
getOwningType, getSpaces, toString, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.mmm.code.api.item.CodeItem
getLanguage, write, write, write, write, write
-
Constructor Details
-
JavaFactoryConstant
The constructor.- Parameters:
value- thevalue.
-
-
Method Details
-
of
- Parameters:
value- the literal value.- Returns:
- the
JavaConstantfor the givenvalue. May benullif the type of the givenvalueis not supported.
-