Class JavaLiteralBoolean
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.literal.JavaLiteral<Boolean>
io.github.mmm.code.impl.java.expression.literal.JavaLiteralBoolean
- All Implemented Interfaces:
io.github.mmm.code.api.expression.CodeCondition,io.github.mmm.code.api.expression.CodeConstant,io.github.mmm.code.api.expression.CodeExpression,io.github.mmm.code.api.expression.CodeLiteral,io.github.mmm.code.api.item.CodeItem,JavaExpression
public final class JavaLiteralBoolean
extends JavaLiteral<Boolean>
implements io.github.mmm.code.api.expression.CodeCondition
Implementation of
JavaLiteral for boolean literal.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JavaLiteralBooleanJavaLiteralforfalse.static final JavaLiteralBooleanJavaLiteralfortrue.Fields inherited from interface io.github.mmm.code.api.item.CodeItem
DEFAULT_INDENT, DEFAULT_NEWLINE -
Method Summary
Methods inherited from class io.github.mmm.code.impl.java.expression.literal.JavaLiteral
evaluate, isPrimitive, ofMethods inherited from class io.github.mmm.code.impl.java.expression.constant.JavaConstant
doWrite, getValue, ofMethods 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.expression.CodeConstant
getValueMethods inherited from interface io.github.mmm.code.api.item.CodeItem
getLanguage, write, write, write, write, write
-
Field Details
-
TRUE
JavaLiteralfortrue. -
FALSE
JavaLiteralforfalse.
-
-
Method Details
-
getSourceCode
- Specified by:
getSourceCodein interfaceio.github.mmm.code.api.item.CodeItem- Specified by:
getSourceCodein classJavaConstant<Boolean>
-
withValue
- Specified by:
withValuein classJavaLiteral<Boolean>- Parameters:
newValue- the newvalue. May not benull.- Returns:
- the corresponding
JavaConstantof the same type with the given value.
-
getJavaClass
- Overrides:
getJavaClassin classJavaConstant<Boolean>- Returns:
- the
Classreflecting the type of this constant.
-
of
- Parameters:
value- the literal value.- Returns:
- the
CodeLiteralfor the givenvalue.
-