com.caucho.quercus.env
Class ConstStringValue

java.lang.Object
  extended by com.caucho.quercus.env.Value
      extended by com.caucho.quercus.env.StringValue
          extended by com.caucho.quercus.env.BinaryValue
              extended by com.caucho.quercus.env.StringBuilderValue
                  extended by com.caucho.quercus.env.ConstStringValue
All Implemented Interfaces:
ByteAppendable, java.io.Serializable, java.lang.CharSequence
Direct Known Subclasses:
CompiledConstStringValue

public class ConstStringValue
extends StringBuilderValue

Represents a StringValue that is never modified. For compiled code.

See Also:
Serialized Form

Field Summary
static ConstStringValue EMPTY
           
 
Fields inherited from class com.caucho.quercus.env.StringValue
IS_DOUBLE, IS_LONG, IS_STRING, MIN_LENGTH
 
Fields inherited from class com.caucho.quercus.env.Value
L, NULL_ARGS, NULL_VALUE_ARRAY, SCALAR_V
 
Constructor Summary
ConstStringValue()
           
ConstStringValue(byte[] buffer)
           
ConstStringValue(byte[] buffer, int offset, int length)
           
ConstStringValue(byte[] s, Value v1)
           
ConstStringValue(char ch)
           
ConstStringValue(char[] s)
           
ConstStringValue(char[] buffer, int length)
          Creates a new StringBuilderValue with the buffer without copying.
ConstStringValue(char[] buffer, int offset, int length)
           
ConstStringValue(char[] s, Value v1)
           
ConstStringValue(java.lang.String s)
           
ConstStringValue(StringBuilderValue sb)
           
ConstStringValue(Value v1)
           
ConstStringValue(Value v1, Value v2)
           
ConstStringValue(Value v1, Value v2, Value v3)
           
 
Method Summary
 void generate(java.io.PrintWriter out)
          Generates code to recreate the expression.
 ValueType getValueType()
          Returns the ValueType.
 boolean isStatic()
           
 void serialize(Env env, java.lang.StringBuilder sb)
          Serializes the value.
protected  void setDoubleValue(DoubleValue value)
           
protected  void setKey(Value value)
           
protected  void setLongValue(LongValue value)
           
protected  void setString(java.lang.String value)
           
protected  void setValueType(ValueType valueType)
           
 double toDouble()
          Converts to a double.
 DoubleValue toDoubleValue()
          Converts to a double vaule
 Value toKey()
          Converts to a key.
 long toLong()
          Converts to a long.
 LongValue toLongValue()
          Converts to a long vaule
 java.lang.String toString()
          Converts to a string.
 
Methods inherited from class com.caucho.quercus.env.StringBuilderValue
append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, appendByte, appendBytes, appendBytes, appendTo, appendTo, appendTo, appendTo, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUtf8, charAt, charValueAt, copyStringBuilder, create, create, create, createStringBuilder, createStringBuilder, createStringBuilder, ensureAppendCapacity, ensureCapacity, eq, eql, equals, get, getBuffer, getBufferLength, getCrc32Value, getHashCode, getOffset, getOutputStream, getType, getValue, getValueType, hashCode, hashCodeCaseInsensitive, indexOf, indexOf, indexOf, isEmpty, isPHP5String, isScalar, isset, length, print, print, put, regionMatches, regionMatchesIgnoreCase, setCharValueAt, setOffset, stringSubstring, subSequence, toBinaryValue, toBinaryValue, toBoolean, toBytes, toDebugString, toDouble, toInputStream, toJavaObject, toLowerCase, toStringBuilder, toStringBuilder, toStringBuilder, toStringBuilder, toUnicodeValue, toUnicodeValue, toUnicodeValue, toUpperCase, varDumpImpl, write, write, writeTo
 
Methods inherited from class com.caucho.quercus.env.BinaryValue
toBinaryValueMarshalCost
 
Methods inherited from class com.caucho.quercus.env.StringValue
add, append, append, append, append, append, appendBytes, appendBytes, appendRead, appendRead, appendReadAll, appendReadAll, appendReadAll, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUtf8, bitAnd, bitOr, bitXor, cmp, cmpString, convertToUnicode, create, create, endsWith, equalsIgnoreCase, getArg, getChars, getRawCharArray, increment, indexOf, isDoubleConvertible, isLongConvertible, isNumber, isNumeric, isString, jsonEncode, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, regionMatches, sub, substring, substring, toAutoArray, toAutoObject, toByteMarshalCost, toCallable, toCharArray, toCharArrayMarshalCost, toCharMarshalCost, toDouble, toDoubleMarshalCost, toFloatMarshalCost, toInputStream, toIntegerMarshalCost, toLong, toLongMarshalCost, toReader, toShortMarshalCost, toSimpleReader, toStringMarshalCost, toStringValue, toStringValue, toStringValueMarshalCost, toUnicode, valuesToArray, varExport
 
Methods inherited from class com.caucho.quercus.env.Value
abs, add, addOne, call, call, call, call, call, call, call, callCopy, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callRef, callRef, callRef, callRef, callRef, callRef, callRef, checkPrivate, checkProtected, clone, containsKey, copy, copy, copy, copyArrayItem, copyReturn, copySaveFunArg, copyTree, current, div, div, end, eqValue, findFunction, geq, getArray, getArray, getBaseIterator, getCallableName, getCalledClass, getClassName, getCount, getCountRecursive, getDirty, getField, getFieldArg, getFieldArgRef, getFieldArray, getFieldObject, getFieldVar, getIterator, getKeyArray, getKeyIterator, getObject, getObject, getQuercusClass, getRef, getResourceType, getSize, getThisField, getThisFieldArg, getThisFieldArgRef, getThisFieldArray, getThisFieldObject, getThisFieldVar, getValueArray, getValueIterator, getVar, gt, hasCurrent, initField, isA, isA, isArray, isBinary, isBoolean, isCallable, isDefault, isDouble, isFieldInit, isLong, isNull, isNumberConvertible, isObject, isResource, isset, issetField, issetThisField, isUnicode, isVar, key, keyExists, leq, lshift, lt, mod, mul, mul, neg, next, nextIndex, pop, pos, postdecr, postincr, postincr, predecr, preincr, preincr, prev, printDepth, printJavaChar, printJavaString, printR, printRImpl, put, put, putField, putField, putField, putObject, putThisField, putThisField, putVar, remove, reset, rshift, serialize, set, setFieldInit, setJavaObject, shuffle, sub_rev, sub, subOne, toArgRef, toArray, toArrayValue, toBigDecimal, toBigInteger, toBinaryValue, toBooleanMarshalCost, toByteArrayMarshalCost, toChar, toException, toInt, toInternString, toJavaBoolean, toJavaByte, toJavaCalendar, toJavaCharacter, toJavaCollection, toJavaDate, toJavaDouble, toJavaFloat, toJavaInteger, toJavaList, toJavaLong, toJavaMap, toJavaObject, toJavaObjectMarshalCost, toJavaObjectNotNull, toJavaShort, toJavaString, toJavaURL, toLocalRef, toLocalThis, toLocalValue, toLocalValueReadOnly, toLocalVar, toLocalVarDeclAsRef, toObject, toRef, toRefValue, toString, toUnicodeValueMarshalCost, toValue, toVar, unsetArray, unsetField, unsetThisArray, unsetThisField, varDump
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final ConstStringValue EMPTY
Constructor Detail

ConstStringValue

public ConstStringValue()

ConstStringValue

public ConstStringValue(StringBuilderValue sb)

ConstStringValue

public ConstStringValue(byte[] buffer,
                        int offset,
                        int length)

ConstStringValue

public ConstStringValue(char[] buffer,
                        int offset,
                        int length)

ConstStringValue

public ConstStringValue(char[] buffer,
                        int length)
Creates a new StringBuilderValue with the buffer without copying.


ConstStringValue

public ConstStringValue(byte[] buffer)

ConstStringValue

public ConstStringValue(char ch)

ConstStringValue

public ConstStringValue(java.lang.String s)

ConstStringValue

public ConstStringValue(char[] s)

ConstStringValue

public ConstStringValue(char[] s,
                        Value v1)

ConstStringValue

public ConstStringValue(byte[] s,
                        Value v1)

ConstStringValue

public ConstStringValue(Value v1)

ConstStringValue

public ConstStringValue(Value v1,
                        Value v2)

ConstStringValue

public ConstStringValue(Value v1,
                        Value v2,
                        Value v3)
Method Detail

isStatic

public boolean isStatic()

setLongValue

protected void setLongValue(LongValue value)

setDoubleValue

protected void setDoubleValue(DoubleValue value)

setString

protected void setString(java.lang.String value)

setKey

protected void setKey(Value value)

setValueType

protected void setValueType(ValueType valueType)

toLongValue

public LongValue toLongValue()
Converts to a long vaule

Overrides:
toLongValue in class Value

toDoubleValue

public DoubleValue toDoubleValue()
Converts to a double vaule

Overrides:
toDoubleValue in class Value

toLong

public long toLong()
Converts to a long.

Overrides:
toLong in class StringBuilderValue

toDouble

public double toDouble()
Converts to a double.

Overrides:
toDouble in class StringBuilderValue

getValueType

public ValueType getValueType()
Returns the ValueType.

Overrides:
getValueType in class StringBuilderValue

toKey

public Value toKey()
Converts to a key.

Overrides:
toKey in class StringBuilderValue

serialize

public void serialize(Env env,
                      java.lang.StringBuilder sb)
Serializes the value.

Overrides:
serialize in class StringBuilderValue

generate

public void generate(java.io.PrintWriter out)
              throws java.io.IOException
Generates code to recreate the expression.

Overrides:
generate in class StringValue
Parameters:
out - the writer to the Java source code.
Throws:
java.io.IOException

toString

public java.lang.String toString()
Description copied from class: StringBuilderValue
Converts to a string.

Specified by:
toString in interface java.lang.CharSequence
Overrides:
toString in class StringBuilderValue