net.sf.japaki.self
Class OptionalParserBean

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

public class OptionalParserBean
extends AbstractGenericBean<OptionalParserBean>
implements ParserBean

Parser bean for optional parsers.

See Also:
OptionalParser

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.japaki.beans.AbstractGenericBean
AbstractGenericBean.GenericProperty<B extends AbstractGenericBean,V>
 
Field Summary
static Property<OptionalParserBean,ParserBean> baseP
          Property of the base field
 
Constructor Summary
OptionalParserBean()
           
 
Method Summary
 ParserBean getBase()
          Returns base parser bean.
 List<Property<? super OptionalParserBean,?>> 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 setBase(ParserBean base)
          Changes the value of the base 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

baseP

public static final Property<OptionalParserBean,ParserBean> baseP
Property of the base field

Constructor Detail

OptionalParserBean

public OptionalParserBean()
Method Detail

getBase

public ParserBean getBase()
Returns base parser bean.

Returns:
base parser bean

setBase

public void setBase(ParserBean base)
Changes the value of the base field.

Parameters:
base - new value of the base field

getProperties

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

Specified by:
getProperties in interface GenericBean<OptionalParserBean>
Specified by:
getProperties in class AbstractGenericBean<OptionalParserBean>
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<OptionalParserBean>

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<OptionalParserBean>

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