org.jboss.maven.shared.xml.dom4j
Class ExtracterSupport

java.lang.Object
  extended by org.jboss.maven.shared.xml.dom4j.ExtracterSupport
All Implemented Interfaces:
Extracter
Direct Known Subclasses:
AttributeValueExtracter, ElementValueExtracter, NestedElementValueExtracter

public abstract class ExtracterSupport
extends java.lang.Object
implements Extracter

Simple support class for Extracter implementations.

Author:
Steve Ebersole

Constructor Summary
protected ExtracterSupport(boolean required, java.lang.String defaultValue)
           
 
Method Summary
 java.lang.String extract(org.dom4j.Element element)
          Extract appropriate value from the given element.
protected abstract  java.lang.String extractValue(org.dom4j.Element element)
          Extract the value according to the underlying implementations contract.
protected  void requiredMissing()
          Indicates that the implementation requires this value, but that null was encountered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtracterSupport

protected ExtracterSupport(boolean required,
                           java.lang.String defaultValue)
Method Detail

extract

public final java.lang.String extract(org.dom4j.Element element)
Description copied from interface: Extracter
Extract appropriate value from the given element.

Specified by:
extract in interface Extracter
Parameters:
element - Element from which to extract the value.
Returns:
The extracted value.

extractValue

protected abstract java.lang.String extractValue(org.dom4j.Element element)
Extract the value according to the underlying implementations contract. The given element is guarenteed to not be null.

Parameters:
element - The non-null element.
Returns:
The extracted value.

requiredMissing

protected void requiredMissing()
Indicates that the implementation requires this value, but that null was encountered.



Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.