Class JLiteral


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

      • JLiteral

        public JLiteral()
        Creates a new literal.
      • JLiteral

        public JLiteral​(java.lang.Object aValue)
        Creates a new literal with given value.
    • Method Detail

      • 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 java.lang.Object getValue()
        Returns the value.
      • createValue

        protected java.lang.Object createValue()
        Creates the value.
      • getValueString

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

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

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

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