net.larsan.urd.conf
Class AttributeReflector

java.lang.Object
  |
  +--net.larsan.urd.conf.AttributeReflector
Direct Known Subclasses:
CmdServerFactory, DirectoryContainerFactory

public class AttributeReflector
extends java.lang.Object

A simple base class used by fatories. Attributes as given in a properties object will by set on a target object such that an attribute named "bindAddress" will be set using a "setBindAddress" method.

Version:
Alpha-0.1 / 2002-10-06 21:37
Author:
Lars J. Nilsson

Constructor Summary
AttributeReflector()
           
 
Method Summary
protected  void reflectAttributes(java.lang.Object target, java.util.Properties attributes)
          Set attributes as members in an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeReflector

public AttributeReflector()
Method Detail

reflectAttributes

protected void reflectAttributes(java.lang.Object target,
                                 java.util.Properties attributes)
                          throws ConfigurationException
Set attributes as members in an object. The attributes will be set using the java bean naming convention so that attribute "port" will be set using method "setPort".

The attribute "factoryClass" is ignored.

This method uses strict naming. All attributes must be matched by a "set"-method.

Empty attributes will not be set.

Parameters:
target - Object to set attributes in
Throws:
ConfigurationException - If an attribute cannot be set