org.reactive.beans.factory.config
Class AbstractPlaceholder

java.lang.Object
  extended by org.reactive.beans.factory.config.AbstractPlaceholder
All Implemented Interfaces:
Placeholder
Direct Known Subclasses:
DefaultPlaceholder

public abstract class AbstractPlaceholder
extends java.lang.Object
implements Placeholder

Allows for configuration of individual bean property values from a configuration resource.

Since:
16/12/2004
Version:
$Id: AbstractPlaceholder.java,v 1.1 2004/12/26 23:42:29 dan_washusen Exp $
Author:
Dan Washusen

Field Summary
protected  java.lang.String key
           
protected  java.lang.Class type
           
 
Constructor Summary
AbstractPlaceholder(java.lang.String value)
          The constructor calls the determineType(String) and determineKey(String) methods to determine the placeholders type and the placeholders key respectivly.
 
Method Summary
protected abstract  java.lang.String determineKey(java.lang.String value)
          Determines the key that the PlaceholderMatcher will use to evaluate the placeholder.
protected abstract  java.lang.Class determineType(java.lang.String value)
          Determines the class that the placeholder will evaluate to.
 java.lang.String getKey()
          Returns the key that will be used to ask the configurable source for a value.
 java.lang.Class getType()
          The class the the configuration key will resolve to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected java.lang.Class type

key

protected java.lang.String key
Constructor Detail

AbstractPlaceholder

public AbstractPlaceholder(java.lang.String value)
The constructor calls the determineType(String) and determineKey(String) methods to determine the placeholders type and the placeholders key respectivly.

Parameters:
value - The value to construct a placeholder out of
Method Detail

getKey

public java.lang.String getKey()
Description copied from interface: Placeholder
Returns the key that will be used to ask the configurable source for a value.

Specified by:
getKey in interface Placeholder
Returns:
The configation key

getType

public java.lang.Class getType()
Description copied from interface: Placeholder
The class the the configuration key will resolve to. The most common will probably be the String class as spring takes care of most of the conversions for you

Specified by:
getType in interface Placeholder
Returns:
The class that the key resolves to

determineType

protected abstract java.lang.Class determineType(java.lang.String value)
Determines the class that the placeholder will evaluate to.

Parameters:
value - The String representation of the placeholder
Returns:
The Class representation of the placeholders type

determineKey

protected abstract java.lang.String determineKey(java.lang.String value)
Determines the key that the PlaceholderMatcher will use to evaluate the placeholder.

Parameters:
value - The String representation of the placeholder
Returns:
The key that the PlaceholderMatcher will use to evaluate the placeholder


Copyright © 2004-2005 reactive.org. All Rights Reserved.