org.apache.commons.attributes.validation
Class AttributeValidatorTask

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.apache.commons.attributes.validation.AttributeValidatorTask

public class AttributeValidatorTask
extends org.apache.tools.ant.Task

Ant task that validates attributes. Usage:


     <taskdef resource="org/apache/commons/attributes/anttasks.properties"/>
     
     <attribute-validator jarFile="myclasses.jar">
         <classpath>
             ...
         </classpath>
         <validator class="my.Validator"/>
         <validator class="my.other.Validator"/>
     </attribute-validator>
 
The task will run the validator(s) with the classes the given jar file.


Nested Class Summary
static class AttributeValidatorTask.Validator
           
 
Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
AttributeValidatorTask()
           
 
Method Summary
 org.apache.tools.ant.types.Path createClasspath()
           
 AttributeValidatorTask.Validator createValidator()
           
 void execute()
           
protected  void findJarFile()
           
 void setBaseName(File baseName)
           
 void setJarfile(File jarFile)
           
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeValidatorTask

public AttributeValidatorTask()
Method Detail

setJarfile

public void setJarfile(File jarFile)

setBaseName

public void setBaseName(File baseName)

createClasspath

public org.apache.tools.ant.types.Path createClasspath()

createValidator

public AttributeValidatorTask.Validator createValidator()

findJarFile

protected void findJarFile()
                    throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException


Copyright © The Apache Software Foundation. All Rights Reserved.