Browse Source

Remove unused code.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270220 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
354d01ab77
2 changed files with 0 additions and 78 deletions
  1. +0
    -39
      proposal/myrmidon/src/main/org/apache/tools/ant/TaskAdapter.java
  2. +0
    -39
      proposal/myrmidon/src/todo/org/apache/tools/ant/TaskAdapter.java

+ 0
- 39
proposal/myrmidon/src/main/org/apache/tools/ant/TaskAdapter.java View File

@@ -18,46 +18,8 @@ import org.apache.myrmidon.api.TaskException;
*/
public class TaskAdapter extends Task
{

Object proxy;

/**
* Checks a class, whether it is suitable to be adapted by TaskAdapter.
* Checks conditions only, which are additionally required for a tasks
* adapted by TaskAdapter. Thus, this method should be called by {@link
* Project#checkTaskClass}. Throws a TaskException and logs as
* Project.MSG_ERR for conditions, that will cause the task execution to
* fail. Logs other suspicious conditions with Project.MSG_WARN.
*
* @param taskClass Description of Parameter
* @param project Description of Parameter
*/
public static void checkTaskClass( final Class taskClass, final Project project )
throws TaskException
{
// don't have to check for interface, since then
// taskClass would be abstract too.
try
{
final Method executeM = taskClass.getMethod( "execute", null );
// don't have to check for public, since
// getMethod finds public method only.
// don't have to check for abstract, since then
// taskClass would be abstract too.
if( !Void.TYPE.equals( executeM.getReturnType() ) )
{
final String message = "return type of execute() should be void but was \"" + executeM.getReturnType() + "\" in " + taskClass;
project.log( message, Project.MSG_WARN );
}
}
catch( NoSuchMethodException e )
{
final String message = "No public execute() in " + taskClass;
project.log( message, Project.MSG_ERR );
throw new TaskException( message );
}
}

/**
* Set the target object class
*
@@ -124,5 +86,4 @@ public class TaskAdapter extends Task
}

}

}

+ 0
- 39
proposal/myrmidon/src/todo/org/apache/tools/ant/TaskAdapter.java View File

@@ -18,46 +18,8 @@ import org.apache.myrmidon.api.TaskException;
*/
public class TaskAdapter extends Task
{

Object proxy;

/**
* Checks a class, whether it is suitable to be adapted by TaskAdapter.
* Checks conditions only, which are additionally required for a tasks
* adapted by TaskAdapter. Thus, this method should be called by {@link
* Project#checkTaskClass}. Throws a TaskException and logs as
* Project.MSG_ERR for conditions, that will cause the task execution to
* fail. Logs other suspicious conditions with Project.MSG_WARN.
*
* @param taskClass Description of Parameter
* @param project Description of Parameter
*/
public static void checkTaskClass( final Class taskClass, final Project project )
throws TaskException
{
// don't have to check for interface, since then
// taskClass would be abstract too.
try
{
final Method executeM = taskClass.getMethod( "execute", null );
// don't have to check for public, since
// getMethod finds public method only.
// don't have to check for abstract, since then
// taskClass would be abstract too.
if( !Void.TYPE.equals( executeM.getReturnType() ) )
{
final String message = "return type of execute() should be void but was \"" + executeM.getReturnType() + "\" in " + taskClass;
project.log( message, Project.MSG_WARN );
}
}
catch( NoSuchMethodException e )
{
final String message = "No public execute() in " + taskClass;
project.log( message, Project.MSG_ERR );
throw new TaskException( message );
}
}

/**
* Set the target object class
*
@@ -124,5 +86,4 @@ public class TaskAdapter extends Task
}

}

}

Loading…
Cancel
Save