BeanIO 2.0.4

org.beanio.internal.parser
Class ParserComponent

java.lang.Object
  extended by org.beanio.internal.util.TreeNode<Component>
      extended by org.beanio.internal.parser.Component
          extended by org.beanio.internal.parser.ParserComponent
All Implemented Interfaces:
Cloneable, Iterable<Component>, Parser, Replicateable
Direct Known Subclasses:
DelegatingParser, Field, Group, Segment, XmlSelectorWrapper

public abstract class ParserComponent
extends Component
implements Parser

Base class for all parser components in that implement Parser.

The method isSupportedChild(Component) is overridden to restrict children to components that also implement Parser.

Since:
2.0
Author:
Kevin Seim
See Also:
Parser

Constructor Summary
ParserComponent()
          Constructs a new ParserComponent.
ParserComponent(int size)
          Constructs a new ParserComponent.
 
Method Summary
protected  boolean isSupportedChild(Component child)
          Returns whether a node is a supported child of this node.
 
Methods inherited from class org.beanio.internal.parser.Component
registerLocals
 
Methods inherited from class org.beanio.internal.util.TreeNode
add, clone, find, getChildren, getFirst, getName, iterator, print, setName, size, sort, toParamString, toString, updateReferences
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.beanio.internal.parser.Parser
clearValue, getName, getSize, getValue, hasContent, isIdentifier, isLazy, marshal, matches, setValue, unmarshal
 

Constructor Detail

ParserComponent

public ParserComponent()
Constructs a new ParserComponent.


ParserComponent

public ParserComponent(int size)
Constructs a new ParserComponent.

Parameters:
size - the initial child capacity
Method Detail

isSupportedChild

protected boolean isSupportedChild(Component child)
Description copied from class: TreeNode
Returns whether a node is a supported child of this node. Called by TreeNode.add(TreeNode).

Overrides:
isSupportedChild in class TreeNode<Component>
Parameters:
child - the node to test
Returns:
true if the child is allowed

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim