|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.slee.resource.ConfigProperties.Property
public static final class ConfigProperties.Property
The Property class represents a single property.
| Constructor Summary | |
|---|---|
ConfigProperties.Property(java.lang.String name,
java.lang.String type,
java.lang.Object value)
Create a new property object. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Compare this property for equality with another. |
java.lang.String |
getName()
Get the name of the property. |
java.lang.String |
getType()
Get the Java class type of the property. |
java.lang.Object |
getValue()
Get the current value of the property. |
int |
hashCode()
Get a hash code for this property. |
void |
setValue(java.lang.Object value)
Set a new value for the property. |
static java.lang.Object |
toObject(java.lang.String type,
java.lang.String value)
Utility method to convert the string representation of a value to a value object of a specified type. |
java.lang.String |
toString()
Get a string representation of this property object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConfigProperties.Property(java.lang.String name,
java.lang.String type,
java.lang.Object value)
throws java.lang.IllegalArgumentException
name - the name of the property.type - the Java class type of the property.value - the value of the property. If value is not null, then
value.getClass().getName().equals(type) must hold true.
java.lang.NullPointerException - if name or type is null.
java.lang.IllegalArgumentException - if value.getClass().getName().equals(type)
is not true.| Method Detail |
|---|
public java.lang.String getName()
public java.lang.String getType()
public java.lang.Object getValue()
null.
public void setValue(java.lang.Object value)
throws java.lang.IllegalArgumentException
value - the value of the property. If value is not null, then
value.getClass().getName().equals(getType()) must hold true.
java.lang.IllegalArgumentException - if value.getClass().getName().equals(getType())
is not true.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare this with.
true if obj is an instance of this class with
the same property name, type, and value as this, false otherwise.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
public static java.lang.Object toObject(java.lang.String type,
java.lang.String value)
throws java.lang.IllegalArgumentException
toObject("java.lang.Integer","5") returns a
java.lang.Integer object containing the value 5.
The following types can be converted by this method:
- java.lang.Integer
- java.lang.Long
- java.lang.Double
- java.lang.Float
- java.lang.Short
- java.lang.Byte
- java.lang.Character
- java.lang.Boolean
- java.lang.String
These types are the supported types of SLEE resource adaptor configuration properties,
SBB environment entries, etc.
- Parameters:
type - the type of object to return.value - a string representation of the value to convert.
- Returns:
- an object of the specified type, containing the value represented by the
value argument.
- Throws:
java.lang.NullPointerException - if either argument is null.
java.lang.IllegalArgumentException - if type is not supported by this method,
or if value is not a legal value for the type.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||