public class BooleanLiteral extends Literal
Modifier and Type | Field and Description |
---|---|
static BooleanLiteral |
FALSE |
static BooleanLiteral |
TRUE |
protected boolean |
value |
Modifier | Constructor and Description |
---|---|
private |
BooleanLiteral(boolean value)
Boolean literal.
|
|
BooleanLiteral(ExtList children,
boolean value)
Boolean literal.
|
|
BooleanLiteral(ExtList children,
PositionInfo pos,
boolean value)
Boolean literal.
|
|
BooleanLiteral(PositionInfo pos,
boolean value)
Boolean literal.
|
Modifier and Type | Method and Description |
---|---|
protected int |
computeHashCode() |
boolean |
equals(java.lang.Object o) |
boolean |
equalsModRenaming(SourceElement o,
NameAbstractionTable nat)
tests if equals
|
static BooleanLiteral |
getBooleanLiteral(boolean val)
get boolean literal for the given
value . |
KeYJavaType |
getKeYJavaType(Services javaServ)
retrieves the literal's type
|
Name |
getLDTName() |
java.lang.String |
getName()
Get value.
|
boolean |
getValue()
Get value.
|
void |
prettyPrint(PrettyPrinter p)
Pretty printing the source element.
|
void |
visit(Visitor v)
calls the corresponding method of a visitor in order to
perform some action/transformation on this element
|
getKeYJavaType, match
getComments, hashCode, prettyPrintMain, reuseSignature
getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getLastElement, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getComments
getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getLastElement, getPositionInfo, getRelativePosition, getStartPosition
public static final BooleanLiteral TRUE
public static final BooleanLiteral FALSE
protected final boolean value
private BooleanLiteral(boolean value)
value
- a boolean value.public BooleanLiteral(ExtList children, boolean value)
children
- list with all children
May contain: Commentsvalue
- a boolean value.public BooleanLiteral(ExtList children, PositionInfo pos, boolean value)
children
- list with all childrenpos
- The source code position.value
- a boolean value.public BooleanLiteral(PositionInfo pos, boolean value)
pos
- The source code position.value
- a boolean value.public static BooleanLiteral getBooleanLiteral(boolean val)
value
. This supports
use of single literals, but we do not force it.val
- a boolean specifying the literal to be returnedpublic boolean getValue()
public java.lang.String getName()
public boolean equalsModRenaming(SourceElement o, NameAbstractionTable nat)
equalsModRenaming
in interface SourceElement
equalsModRenaming
in class JavaProgramElement
protected int computeHashCode()
computeHashCode
in class JavaProgramElement
public boolean equals(java.lang.Object o)
equals
in class JavaProgramElement
public void visit(Visitor v)
v
- the Visitorpublic void prettyPrint(PrettyPrinter p) throws java.io.IOException
JavaSourceElement
prettyPrint
in interface SourceElement
prettyPrint
in class JavaProgramElement
p
- a pretty printer.java.io.IOException
- occasionally thrown.public KeYJavaType getKeYJavaType(Services javaServ)
Literal
getKeYJavaType
in class Literal
javaServ
- the Services offering access to the Java modelpublic Name getLDTName()
getLDTName
in class Literal