it.haefelinger.flaka
Class TryCatch.CatchBlock

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.Sequential
              extended by it.haefelinger.flaka.TryCatch.CatchBlock
All Implemented Interfaces:
Cloneable, TaskContainer
Enclosing class:
TryCatch

public static final class TryCatch.CatchBlock
extends Sequential

A helper class implementing a catch clause. The catch clause is a regular task container. It allows further for the specification of a type and a pattern to catch a particular exception.

Author:
wh81752

Field Summary
protected  Pattern match
           
protected  Pattern type
           
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
TryCatch.CatchBlock()
           
 
Method Summary
 Class loadClass(String s)
           
 boolean match(Throwable t)
           
 void setMatch(String match)
          The pattern expession to use to select a particular exception.
 void setType(String type)
          Set the name of the Java class to be catched.
 
Methods inherited from class org.apache.tools.ant.taskdefs.Sequential
addTask, execute
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

match

protected Pattern match

type

protected Pattern type
Constructor Detail

TryCatch.CatchBlock

public TryCatch.CatchBlock()
Method Detail

setType

public void setType(String type)
Set the name of the Java class to be catched. By default, only exceptions of type BuildException are caught.


setMatch

public void setMatch(String match)
The pattern expession to use to select a particular exception.


loadClass

public Class loadClass(String s)

match

public boolean match(Throwable t)