org.jboss.reflect.plugins
Class StringValueImpl

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.reflect.spi.AbstractValue
          extended by org.jboss.reflect.plugins.StringValueImpl
All Implemented Interfaces:
Serializable, Cloneable, StringValue, Value, org.jboss.util.JBossInterface

public class StringValueImpl
extends AbstractValue
implements StringValue

A string value

Author:
Bill Burke, Adrian Brock
See Also:
Serialized Form

Field Summary
protected  TypeInfo type
          The type
protected  String value
          The value
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
StringValueImpl()
          Create a new string value
StringValueImpl(String value, TypeInfo type)
          Create a new string value
 
Method Summary
 boolean equals(Object o)
           
 TypeInfo getType()
          Get the type of the value
 String getValue()
          Get the value
 int hashCode()
           
 boolean isString()
          Is this value a string
 
Methods inherited from class org.jboss.reflect.spi.AbstractValue
asAnnotation, asArray, asClass, asEnum, asPrimitive, asString, isAnnotation, isArray, isClass, isEnum, isPrimitive
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, list, notEqual, toShortString, toShortString, toString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.reflect.spi.Value
asAnnotation, asArray, asClass, asEnum, asPrimitive, asString, isAnnotation, isArray, isClass, isEnum, isPrimitive
 

Field Detail

value

protected String value
The value


type

protected TypeInfo type
The type

Constructor Detail

StringValueImpl

public StringValueImpl()
Create a new string value


StringValueImpl

public StringValueImpl(String value,
                       TypeInfo type)
Create a new string value

Parameters:
value - the value
type - the type
Method Detail

isString

public boolean isString()
Description copied from interface: Value
Is this value a string

Specified by:
isString in interface Value
Overrides:
isString in class AbstractValue
Returns:
true when a string

getValue

public String getValue()
Description copied from interface: StringValue
Get the value

Specified by:
getValue in interface StringValue
Returns:
the value

getType

public TypeInfo getType()
Description copied from interface: Value
Get the type of the value

Specified by:
getType in interface Value
Returns:
the type

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class org.jboss.util.JBossObject


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.