net.sf.japaki.self
Class Inspector<B,V>

java.lang.Object
  extended by net.sf.japaki.self.Inspector<B,V>
Direct Known Subclasses:
GenericBeanInspector, JavaBeanInspector, KeyValueBeanInspector, LeafInspector, SinglePropertyBeanInspector

public abstract class Inspector<B,V>
extends Object

Retrieves a property from the underlying bean by name.


Constructor Summary
protected Inspector(Property<B,V> property, InspectorMill inspectorMill)
          Constructs an inspector from the given arguments.
 
Method Summary
 Inspector<? super V,?> findChild(String name)
          Creates a new inspector for a property of the underlying class with the specified name.
protected abstract  Property<? super V,?> findProperty(String name)
          Searches a property in the base class of this inspector with the specified name.
protected  InspectorMill getMill()
          Returns the mill that is used to create new inspectors.
 ParserStore getParserStore()
          Returns the parser store used to create new parsers.
 Property<B,V> getProperty()
          Returns the property used to create new parsers.
protected  Class<V> getType()
          Returns the class in which properties are searched.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Inspector

protected Inspector(Property<B,V> property,
                    InspectorMill inspectorMill)
Constructs an inspector from the given arguments.

Parameters:
property - the property used to create new parserss
inspectorMill - the inspector mill used to create new inspectors
Method Detail

getProperty

public Property<B,V> getProperty()
Returns the property used to create new parsers.

Returns:
the property used to create new parsers

getMill

protected InspectorMill getMill()
Returns the mill that is used to create new inspectors.

Returns:
the mill that is used to create new inspectors

getType

protected Class<V> getType()
Returns the class in which properties are searched.

Returns:
the class in which properties are searched.

getParserStore

public ParserStore getParserStore()
Returns the parser store used to create new parsers.

Returns:
the parser store used to create new parsers

findProperty

protected abstract Property<? super V,?> findProperty(String name)
Searches a property in the base class of this inspector with the specified name.

Parameters:
name - name of the property
Returns:
a property with the specified name
Throws:
NullPointerException - if name is null
NoSuchPropertyException - if a property with the specified name could not be found.

findChild

public Inspector<? super V,?> findChild(String name)
Creates a new inspector for a property of the underlying class with the specified name.

Parameters:
name - name of the property
Returns:
the created inspector
Throws:
NoSuchPropertyException - if a property with the specified name could not be found.