Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.config.java.valuesource
Class AbstractStringBasedValueResolver

    java.lang.Object
      org.springframework.config.java.valuesource.AbstractStringBasedValueResolver

All Implemented Interfaces:
  ValueResolver

Direct Known Subclasses:
  EnvironmentValueResolver, MessageSourceValueSource, PropertiesValueResolver, SystemPropertiesValueResolver

    public abstract class AbstractStringBasedValueResolver

extends java.lang.Object
implements ValueResolver

Base class for use by all `ValueResolver` implementations that will return String.

Author:
  Rod Johnson, Chris Beams
See Also:
  `getString(String)`

Constructor Summary
`AbstractStringBasedValueResolver()`

Method Summary
`abstract java.lang.String` | `getString(java.lang.String name)` Return value associated with name.
`
`<T> T`
` | `resolve(java.lang.String name, java.lang.Class<?> requiredType)` Return value associated with name, where value is of type requiredType.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractStringBasedValueResolver

    public AbstractStringBasedValueResolver()

Method Detail

### resolve

    public <T> T resolve(java.lang.String name,
                         java.lang.Class<?> requiredType)
              throws ValueResolutionException

  Return value associated with name, where value is of type requiredType. For String-based values, consider `getString(String)`.

  Specified by:
    `resolve` in interface `ValueResolver`
  Parameters:
    `name` - name of the value to resolve
    `requiredType` - work around Java type erasure
  Throws:
    `ValueResolutionException` - if the value is not of the required format or the value associated with name is not found

### getString

    public abstract java.lang.String getString(java.lang.String name)
                                        throws ValueResolutionException

  Return value associated with name.

  Throws:
    `ValueResolutionException` - if name cannot be found within this `ValueResolver` - it is incumbent upon all subclasses to adhere to these semantics.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD