Java Doc for Definer.java in  » Build » ANT » org » apache » tools » ant » taskdefs » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Build » ANT » org.apache.tools.ant.taskdefs 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.tools.ant.taskdefs.AntlibDefinition
   org.apache.tools.ant.taskdefs.DefBase
      org.apache.tools.ant.taskdefs.Definer

All known Subclasses:   org.apache.tools.ant.taskdefs.Typedef,
Definer
abstract public class Definer extends DefBase (Code)
Base class for Taskdef and Typedef - handles all the attributes for Typedef. The uri and class handling is handled by DefBase
since:
   Ant 1.4

Inner Class :public static class OnError extends EnumeratedAttribute
Inner Class :public static class Format extends EnumeratedAttribute



Method Summary
protected  voidaddDefinition(ClassLoader al, String name, String classname)
    
public  voidexecute()
     Run the definition.
public  StringgetClassname()
     Returns the classname of the object we are defining.
public  FilegetFile()
    
public  StringgetName()
    
public  StringgetResource()
    
protected  voidloadProperties(ClassLoader al, URL url)
     Load type definitions as properties from a URL.
public static  StringmakeResourceFromURI(String uri)
     This is where the logic to map from a URI to an antlib resource is kept.
Parameters:
  uri - the xml namespace uri that to convert.
public  voidsetAdaptTo(String adaptTo)
     Set the classname of the class that the definition must be compatible with, either directly or by use of the adapter class.
protected  voidsetAdaptToClass(Class adaptToClass)
     Set the class for adaptToClass, to be used by derived classes, used instead of the adaptTo attribute.
public  voidsetAdapter(String adapter)
     Set the class name of the adapter class. An adapter class is used to proxy the definition class.
protected  voidsetAdapterClass(Class adapterClass)
     Set the adapter class.
public  voidsetAntlib(String antlib)
     Antlib attribute, sets resource and uri.
public  voidsetClassname(String classname)
     The full class name of the object being defined.
public  voidsetFile(File file)
     Name of the property file to load ant name/classname pairs from.
public  voidsetFormat(Format format)
    
public  voidsetName(String name)
    
public  voidsetOnError(OnError onError)
     What to do if there is an error in loading the class.
public  voidsetResource(String res)
     Name of the property resource to load ant name/classname pairs from.



Method Detail
addDefinition
protected void addDefinition(ClassLoader al, String name, String classname) throws BuildException(Code)
Add a definition using the attributes of Definer
Parameters:
  al - the ClassLoader to use
Parameters:
  name - the name of the definition
Parameters:
  classname - the classname of the definition
exception:
  BuildException - if an error occurs



execute
public void execute() throws BuildException(Code)
Run the definition.
exception:
  BuildException - if an error occurs



getClassname
public String getClassname()(Code)
Returns the classname of the object we are defining. May be null. the class name



getFile
public File getFile()(Code)
the file containing definitions



getName
public String getName()(Code)
the name for this definition



getResource
public String getResource()(Code)
the resource containing definitions



loadProperties
protected void loadProperties(ClassLoader al, URL url)(Code)
Load type definitions as properties from a URL.
Parameters:
  al - the classloader to use
Parameters:
  url - the url to get the definitions from



makeResourceFromURI
public static String makeResourceFromURI(String uri)(Code)
This is where the logic to map from a URI to an antlib resource is kept.
Parameters:
  uri - the xml namespace uri that to convert. the name of a resource. It may not exist



setAdaptTo
public void setAdaptTo(String adaptTo)(Code)
Set the classname of the class that the definition must be compatible with, either directly or by use of the adapter class.
Parameters:
  adaptTo - the name of the adaptto class



setAdaptToClass
protected void setAdaptToClass(Class adaptToClass)(Code)
Set the class for adaptToClass, to be used by derived classes, used instead of the adaptTo attribute.
Parameters:
  adaptToClass - the class for adapto.



setAdapter
public void setAdapter(String adapter)(Code)
Set the class name of the adapter class. An adapter class is used to proxy the definition class. It is used if the definition class is not assignable to the adaptto class, or if the adaptto class is not present.
Parameters:
  adapter - the name of the adapter class



setAdapterClass
protected void setAdapterClass(Class adapterClass)(Code)
Set the adapter class.
Parameters:
  adapterClass - the class to use to adapt the definition class



setAntlib
public void setAntlib(String antlib)(Code)
Antlib attribute, sets resource and uri. uri is set the antlib value and, resource is set to the antlib.xml resource in the classpath. For example antlib="antlib:org.acme.bland.cola" corresponds to uri="antlib:org.acme.bland.cola" resource="org/acme/bland/cola/antlib.xml". ASF Bugzilla Bug 31999
Parameters:
  antlib - the value to set.



setClassname
public void setClassname(String classname)(Code)
The full class name of the object being defined. Required, unless file or resource have been specified.
Parameters:
  classname - the name of the class



setFile
public void setFile(File file)(Code)
Name of the property file to load ant name/classname pairs from.
Parameters:
  file - the file



setFormat
public void setFormat(Format format)(Code)
Sets the format of the file or resource
Parameters:
  format - the enumerated value - xml or properties



setName
public void setName(String name)(Code)
Name of the definition
Parameters:
  name - the name of the definition



setOnError
public void setOnError(OnError onError)(Code)
What to do if there is an error in loading the class.
  • error - throw build exception
  • report - output at warning level
  • ignore - output at debug level

  • Parameters:
      onError - an OnError value



    setResource
    public void setResource(String res)(Code)
    Name of the property resource to load ant name/classname pairs from.
    Parameters:
      res - the resource to use



    Methods inherited from org.apache.tools.ant.taskdefs.DefBase
    public Path createClasspath()(Code)(Java Doc)
    protected ClassLoader createLoader()(Code)(Java Doc)
    public Path getClasspath()(Code)(Java Doc)
    public String getClasspathId()(Code)(Java Doc)
    public String getLoaderId()(Code)(Java Doc)
    protected boolean hasCpDelegate()(Code)(Java Doc)
    public void init() throws BuildException(Code)(Java Doc)
    public boolean isReverseLoader()(Code)(Java Doc)
    public void setClasspath(Path classpath)(Code)(Java Doc)
    public void setClasspathRef(Reference r)(Code)(Java Doc)
    public void setLoaderRef(Reference r)(Code)(Java Doc)
    public void setReverseLoader(boolean reverseLoader)(Code)(Java Doc)

    Methods inherited from org.apache.tools.ant.taskdefs.AntlibDefinition
    public ClassLoader getAntlibClassLoader()(Code)(Java Doc)
    public String getURI()(Code)(Java Doc)
    public void setAntlibClassLoader(ClassLoader classLoader)(Code)(Java Doc)
    public void setURI(String uri) throws BuildException(Code)(Java Doc)

    www.java2java.com | Contact Us
    Copyright 2009 - 12 Demo Source and Support. All rights reserved.
    All other trademarks are property of their respective owners.