Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.presumo.jms.selector
Class JmsStringLiteral  view JmsStringLiteral download JmsStringLiteral.java

java.lang.Object
  extended bycom.presumo.jms.selector.JmsOperand
      extended bycom.presumo.jms.selector.JmsDataType
          extended bycom.presumo.jms.selector.JmsStringLiteral

class JmsStringLiteral
extends JmsDataType

Expression node to represent String literals


Field Summary
(package private)  java.lang.String data
           
private static java.util.Hashtable instances
           
protected  java.lang.String stringRepresentation
           
 
Fields inherited from class com.presumo.jms.selector.JmsOperand
evalNumber, JMS_BINARY_ADD, JMS_BINARY_AND, JMS_BINARY_DIV, JMS_BINARY_MULT, JMS_BINARY_OR, JMS_BINARY_SUB, JMS_BOOLEAN_LITERAL, JMS_EQUALS, JMS_FLOAT_LITERAL, JMS_GREATER, JMS_IDENTIFIER, JMS_INTEGER_LITERAL, JMS_IS, JMS_LESS, JMS_LIKE, JMS_NOT, JMS_STRING_LITERAL, lastEval, myEvalNumber, parents, refcount
 
Constructor Summary
protected JmsStringLiteral(java.lang.String newValue)
          Called by getInstance which controls instance creation.
 
Method Summary
protected  void delete(JmsOperand parent)
           
(package private)  JmsBooleanLiteral eq(JmsDataType value)
           
(package private)  JmsOperand evaluate(javax.jms.Message msg)
          Returns the object represented by this instance.
(package private)  JmsOperand evaluateOnce(javax.jms.Message msg)
          Returns the object represented by this instance.
(package private) static JmsStringLiteral getInstance(java.lang.String newValue)
          Psuedo-singleton access point.
(package private)  short getType()
          Used to identify this object in places where instanceof is inapplicable.
(package private) static JmsStringLiteral getUniqueInstance(java.lang.String newValue)
          During evaluation, JmsIdentifier needs to create JmsStringLiterals.
 java.lang.String toString()
          Create a string representation of this object.
(package private)  java.lang.String unParse()
          Returns a String representing the SQL form of the filter which is logically equivilant.
 
Methods inherited from class com.presumo.jms.selector.JmsOperand
addParent, addParentRef, allParents, delete, getAllInstances, hasParent, incrementAllRefCounts, incrementRefCount, numberOfParents, printTree, removeParent, resetStoredEvals
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

data

final java.lang.String data

instances

private static java.util.Hashtable instances

stringRepresentation

protected java.lang.String stringRepresentation
Constructor Detail

JmsStringLiteral

protected JmsStringLiteral(java.lang.String newValue)
Called by getInstance which controls instance creation.

Method Detail

getInstance

static JmsStringLiteral getInstance(java.lang.String newValue)
Psuedo-singleton access point. Only one instance for each long value will ever be created and returned.


getUniqueInstance

static JmsStringLiteral getUniqueInstance(java.lang.String newValue)
During evaluation, JmsIdentifier needs to create JmsStringLiterals. These literals need not be singletons. This access point returns a non-singleton instance.


toString

public java.lang.String toString()
Create a string representation of this object.

Overrides:
toString in class JmsDataType

eq

JmsBooleanLiteral eq(JmsDataType value)
               throws SelectorFalseException
Specified by:
eq in class JmsDataType

getType

short getType()
Used to identify this object in places where instanceof is inapplicable.

Specified by:
getType in class JmsOperand

delete

protected void delete(JmsOperand parent)
Overrides:
delete in class JmsOperand

evaluate

final JmsOperand evaluate(javax.jms.Message msg)
                   throws SelectorFalseException
Returns the object represented by this instance.

Specified by:
evaluate in class JmsOperand

evaluateOnce

final JmsOperand evaluateOnce(javax.jms.Message msg)
                       throws SelectorFalseException
Returns the object represented by this instance. Saves a method call on something that already has a constant evaluation time.

Overrides:
evaluateOnce in class JmsOperand

unParse

java.lang.String unParse()
Description copied from class: JmsOperand
Returns a String representing the SQL form of the filter which is logically equivilant.

Specified by:
unParse in class JmsOperand