net.sf.japaki.self
Class BeanParserBean

java.lang.Object
  extended by net.sf.japaki.beans.AbstractGenericBean<BeanParserBean>
      extended by net.sf.japaki.self.BeanParserBean
All Implemented Interfaces:
GenericBean<BeanParserBean>, ParserBean

public class BeanParserBean
extends AbstractGenericBean<BeanParserBean>
implements ParserBean

Parser bean for bean parsers.


Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.japaki.beans.AbstractGenericBean
AbstractGenericBean.GenericProperty<B extends AbstractGenericBean,V>
 
Field Summary
static Property<BeanParserBean,List<ParserBean>> beansP
          Property of the beans field
static Property<BeanParserBean,ParserBean> delimiterP
          Property of the delimiter field
static Property<BeanParserBean,String> nameP
          Property of the name field
 
Constructor Summary
BeanParserBean()
           
 
Method Summary
 List<ParserBean> getBeans()
          Returns property parsers.
 ParserBean getDelimiter()
          Returns the current value of the delimiter field.
 String getName()
          Returns name of the parser to be created.
 List<Property<? super BeanParserBean,?>> getProperties()
          Return a list of all properties of this bean.
protected  Object getValue(Property property)
          Implementation of the getValue method of all properties of this bean.
 void setDelimiter(ParserBean delimiter)
          Changes the value of the delimiter field.
 void setName(String name)
          Changes the value of the name field.
protected  void setValue(Property property, Object value)
          Implementation of the setValue method of all properties of this bean.
<T> Parser<? super T>
toParser(Inspector<?,T> inspector)
          Creates a parser from the information stored in the bean.
 
Methods inherited from class net.sf.japaki.beans.AbstractGenericBean
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

beansP

public static final Property<BeanParserBean,List<ParserBean>> beansP
Property of the beans field


nameP

public static final Property<BeanParserBean,String> nameP
Property of the name field


delimiterP

public static final Property<BeanParserBean,ParserBean> delimiterP
Property of the delimiter field

Constructor Detail

BeanParserBean

public BeanParserBean()
Method Detail

getBeans

public List<ParserBean> getBeans()
Returns property parsers.

Returns:
property parsers

getName

public String getName()
Returns name of the parser to be created.

Returns:
name of the parser to be created

getDelimiter

public ParserBean getDelimiter()
Returns the current value of the delimiter field.

Returns:
the current value of the delimiter field

setName

public void setName(String name)
Changes the value of the name field.

Parameters:
name - new value of the name field

setDelimiter

public void setDelimiter(ParserBean delimiter)
Changes the value of the delimiter field.

Parameters:
delimiter - new value of the delimiter field

getProperties

public List<Property<? super BeanParserBean,?>> getProperties()
Description copied from interface: GenericBean
Return a list of all properties of this bean.

Specified by:
getProperties in interface GenericBean<BeanParserBean>
Specified by:
getProperties in class AbstractGenericBean<BeanParserBean>
Returns:
a list of all properties of this bean

getValue

protected Object getValue(Property property)
Description copied from class: AbstractGenericBean
Implementation of the getValue method of all properties of this bean. This method should not be called directly, use AbstractGenericBean.GenericProperty.getValue(B) instead.

Specified by:
getValue in class AbstractGenericBean<BeanParserBean>

setValue

protected void setValue(Property property,
                        Object value)
Description copied from class: AbstractGenericBean
Implementation of the setValue method of all properties of this bean. This method should not be called directly, use AbstractGenericBean.GenericProperty.setValue(B, V) instead.

Specified by:
setValue in class AbstractGenericBean<BeanParserBean>

toParser

public <T> Parser<? super T> toParser(Inspector<?,T> inspector)
Description copied from interface: ParserBean
Creates a parser from the information stored in the bean.

Specified by:
toParser in interface ParserBean
Parameters:
inspector - necessary context information
Returns:
the new parser
Throws:
NullPointerException - if a parameter that is necessary to create the parser is null
IllegalArgumentException - if a property of this bean has a value that can not be used to create a parser