Class JLiteral


public class JLiteral extends JExpr
A JExpr subclass for literals.
  • Constructor Details

    • JLiteral

      public JLiteral()
      Creates a new literal.
    • JLiteral

      public JLiteral(Object aValue)
      Creates a new literal with given value.
  • Method Details

    • getLiteralType

      public JLiteral.LiteralType getLiteralType()
      Returns the Literal type (String, Number, Boolean, Null).
    • setLiteralType

      public void setLiteralType(JLiteral.LiteralType aType)
      Sets the literal type.
    • isNull

      public boolean isNull()
      Returns whether this is null literal.
    • getValue

      public Object getValue()
      Returns the value.
    • createValue

      protected Object createValue()
      Creates the value.
    • getValueString

      public String getValueString()
      Returns the value string.
    • setValueString

      public void setValueString(String aString)
      Sets the value string.
    • getClassNameImpl

      protected String getClassNameImpl()
      Tries to resolve the class name for this node.
      Overrides:
      getClassNameImpl in class JNode
    • getNodeString

      public String getNodeString()
      Returns the part name.
      Overrides:
      getNodeString in class JNode