org.progeeks.util.xml
Class FileSetHandler
java.lang.Object
org.progeeks.util.xml.AbstractObjectHandler
org.progeeks.util.xml.BeanObjectHandler
org.progeeks.util.xml.FileSetHandler
- All Implemented Interfaces:
- ObjectHandler
public class FileSetHandler
- extends BeanObjectHandler
ObjectHandler implementation that can be used to create lists
of java.io.File objects similar to the way that ANT's <fileset>
tag works but modified to fit the semantics of ObjectXmlReader.
Most likely familiar enough to be deceptively confusing.
Example fileset:
<fileset dir="mydir/subdir" >
<patterns>
<include name="**/*.java" />
<exclude name="**/CVS" />
</patterns>
</fileset>
...and so on.
Probably want to also support a directive for specifying the
current working directory at a global level... similar to the
way packages are done.
- Version:
- $Revision: 1.4 $
- Author:
- Paul Speed
Method Summary |
boolean |
canHandle(java.lang.String tag)
Returns true if this handler applies to the specified
object tag. |
java.lang.Object |
createObject(java.lang.String tag,
org.xml.sax.Attributes atts,
ObjectXmlReader reader)
Creates and returns an object based on the specified parameters. |
java.lang.Object |
resolveObject(java.lang.String tag,
java.lang.Object obj,
ObjectXmlReader reader)
Converts a handler-specific internal representation of an object to
a standard representation. |
Methods inherited from class org.progeeks.util.xml.BeanObjectHandler |
getClass, getClass, getConstant, getInnerClass, getPackages, getProperty, getPropertyClass, getPropertyCollection, getTagClass, ignoreAttribute, importPackage, setConfigurationProperty, setObjectProperties, setPackages, setProperty, setTextProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileSetHandler
public FileSetHandler()
canHandle
public boolean canHandle(java.lang.String tag)
- Returns true if this handler applies to the specified
object tag.
- Specified by:
canHandle
in interface ObjectHandler
- Overrides:
canHandle
in class BeanObjectHandler
createObject
public java.lang.Object createObject(java.lang.String tag,
org.xml.sax.Attributes atts,
ObjectXmlReader reader)
- Creates and returns an object based on the specified parameters.
- Specified by:
createObject
in interface ObjectHandler
- Overrides:
createObject
in class BeanObjectHandler
resolveObject
public java.lang.Object resolveObject(java.lang.String tag,
java.lang.Object obj,
ObjectXmlReader reader)
- Converts a handler-specific internal representation of an object to
a standard representation. This is an implementation specific thing since
some handlers will collect attributes/properties in an intermediate object.
When the end of the tag is reached, the ObjectXmlReader will call this method
to perform and necessary translations. Handlers that don't require resolution
should just return the passed object.
Default implementation returns obj.
- Specified by:
resolveObject
in interface ObjectHandler
- Overrides:
resolveObject
in class AbstractObjectHandler
Copyright © 2002-2003 Paul Speed. All Rights Reserved.