JBoss Reflection 2.2.1.SP1

org.jboss.reflect.spi
Class PrimitiveValue

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

public class PrimitiveValue
extends AbstractValue

A primitive value

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

Field Summary
protected  PrimitiveInfo type
          The type
protected  String value
          The value
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
PrimitiveValue()
          Create a primitive value
PrimitiveValue(String value, PrimitiveInfo type)
          Create a primitive value
 
Method Summary
 boolean equals(Object o)
           
 TypeInfo getType()
          Get the type of the value
 String getValue()
          Get the value
 int hashCode()
           
 boolean isPrimitive()
          Is this value a primitive
 
Methods inherited from class org.jboss.reflect.spi.AbstractValue
asAnnotation, asArray, asClass, asEnum, asPrimitive, asString, isAnnotation, isArray, isClass, isEnum, isString
 
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
 

Field Detail

value

protected String value
The value


type

protected PrimitiveInfo type
The type

Constructor Detail

PrimitiveValue

public PrimitiveValue()
Create a primitive value


PrimitiveValue

public PrimitiveValue(String value,
                      PrimitiveInfo type)
Create a primitive value

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

isPrimitive

public boolean isPrimitive()
Description copied from interface: Value
Is this value a primitive

Specified by:
isPrimitive in interface Value
Overrides:
isPrimitive in class AbstractValue
Returns:
true when a primitive

getValue

public String getValue()
Get the value

Returns:
the value

getType

public TypeInfo getType()
Description copied from interface: Value
Get the type of the 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

JBoss Reflection 2.2.1.SP1

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