Package net.jini.config
Class PlainConfiguration
java.lang.Object
net.jini.config.AbstractConfiguration
net.jini.config.PlainConfiguration
- All Implemented Interfaces:
Configuration
-
Nested Class Summary
Nested classes/interfaces inherited from class net.jini.config.AbstractConfiguration
AbstractConfiguration.Primitive -
Field Summary
Fields inherited from interface net.jini.config.Configuration
NO_DATA, NO_DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectgetEntryInternal(String component, String name, Class type, Object data) Returns an object created using the information in the entry matching the specified component and name, and the specified data, for the requested type.static ObjectparseNumber(String text, Class targetClass) voidstatic StringtrimAllWhitespace(String str) Methods inherited from class net.jini.config.AbstractConfiguration
getEntry, getEntry, getEntry, validIdentifier, validQualifiedIdentifier
-
Constructor Details
-
PlainConfiguration
public PlainConfiguration()
-
-
Method Details
-
getEntryInternal
protected Object getEntryInternal(String component, String name, Class type, Object data) throws ConfigurationException Description copied from class:AbstractConfigurationReturns an object created using the information in the entry matching the specified component and name, and the specified data, for the requested type. If the entry value is a primitive, then the object returned should be an instance ofAbstractConfiguration.Primitive. Implementations may usetypeto perform conversions on primitive values, if desired, but are not required to check if the object is of the requested type. Repeated calls with the same arguments may or may not return the identical object.The default implementations of the
getEntrymethods delegate to this method; implementations can rely on the fact that calls made to this method by those methods will have arguments that are notnulland that have the correct syntax.- Specified by:
getEntryInternalin classAbstractConfiguration- Parameters:
component- the component being configuredname- the name of the entry for the componenttype- the type of object requesteddata- an object to use when computing the value of the entry, orConfiguration.NO_DATAto specify no data- Returns:
- an object created using the information in the entry matching
componentandname, and using the value ofdata(unless it isNO_DATA) - Throws:
NoSuchEntryException- if no matching entry is foundConfigurationException- if a matching entry is found but a problem occurs creating the object for the entry- See Also:
-
setEntry
-
parseNumber
-
trimAllWhitespace
-