1. /*
  2. * Copyright 2000-2004 The Apache Software Foundation
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. *
  16. */
  17. package org.apache.tools.ant.taskdefs;
  18. import org.apache.tools.ant.Task;
  19. import org.apache.tools.ant.TaskAdapter;
  20. /**
  21. * Adds a task definition to the current project, such that this new task can be
  22. * used in the current project. Two attributes are needed, the name that identifies
  23. * this task uniquely, and the full name of the class (including the packages) that
  24. * implements this task.</p>
  25. * <p>You can also define a group of tasks at once using the file or
  26. * resource attributes. These attributes point to files in the format of
  27. * Java property files. Each line defines a single task in the
  28. * format:</p>
  29. * <pre>
  30. * taskname=fully.qualified.java.classname
  31. * </pre>
  32. * @since Ant 1.1
  33. * @ant.task category="internal"
  34. */
  35. public class Taskdef extends Typedef {
  36. /**
  37. * Default constructor.
  38. * Creates a new Taskdef instance.
  39. * This sets the adapter and the adaptto classes to
  40. * TaskAdapter and Task.
  41. */
  42. public Taskdef() {
  43. setAdapterClass(TaskAdapter.class);
  44. setAdaptToClass(Task.class);
  45. }
  46. }