Class PlainConfiguration

java.lang.Object
net.jini.config.AbstractConfiguration
net.jini.config.PlainConfiguration
All Implemented Interfaces:
Configuration

public class PlainConfiguration extends AbstractConfiguration
  • 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: AbstractConfiguration
      Returns 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 of AbstractConfiguration.Primitive. Implementations may use type to 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 getEntry methods delegate to this method; implementations can rely on the fact that calls made to this method by those methods will have arguments that are not null and that have the correct syntax.

      Specified by:
      getEntryInternal in class AbstractConfiguration
      Parameters:
      component - the component being configured
      name - the name of the entry for the component
      type - the type of object requested
      data - an object to use when computing the value of the entry, or Configuration.NO_DATA to specify no data
      Returns:
      an object created using the information in the entry matching component and name, and using the value of data (unless it is NO_DATA)
      Throws:
      NoSuchEntryException - if no matching entry is found
      ConfigurationException - if a matching entry is found but a problem occurs creating the object for the entry
      See Also:
    • setEntry

      public void setEntry(String component, String name, Object entry)
    • parseNumber

      public static Object parseNumber(String text, Class targetClass)
    • trimAllWhitespace

      public static String trimAllWhitespace(String str)