Java Doc for UnknownElement.java in  » Build » ANT » org » apache » tools » ant » 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 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.tools.ant.ProjectComponent
      org.apache.tools.ant.Task
         org.apache.tools.ant.UnknownElement

UnknownElement
public class UnknownElement extends Task (Code)
Wrapper class that holds all the information necessary to create a task or data type that did not exist when Ant started, or one which has had its definition updated to use a different implementation class.



Constructor Summary
public  UnknownElement(String elementName)
     Creates an UnknownElement for the given element name.

Method Summary
public  voidaddChild(UnknownElement child)
     Adds a child element to this element.
Parameters:
  child - The child element to add.
public  voidapplyPreSet(UnknownElement u)
     This is used then the realobject of the UE is a PreSetDefinition.
public  voidconfigure(Object realObject)
    
public  UnknownElementcopy(Project newProject)
     Make a copy of the unknown element and set it in the new project.
Parameters:
  newProject - the project to create the UE in.
public  voidexecute()
     Executes the real object if it's a task.
public  ListgetChildren()
    
protected  StringgetComponentName()
    
public  StringgetNamespace()
     Return the namespace of the XML element associated with this component.
protected  BuildExceptiongetNotFoundException(String what, String name)
     Returns a very verbose exception for when a task/data type cannot be found.
Parameters:
  what - The kind of thing being created.
public  StringgetQName()
     Return the qname of the XML element associated with this component.
public  ObjectgetRealThing()
    
public  StringgetTag()
     Returns the name of the XML element which generated this unknown element.
public  TaskgetTask()
     Returns the task instance after it has been created and if it is a task.
public  StringgetTaskName()
     Returns the name to use in logging messages.
public  RuntimeConfigurablegetWrapper()
     Get the RuntimeConfigurable instance for this UnknownElement, containing the configuration information.
protected  voidhandleChildren(Object parent, RuntimeConfigurable parentWrapper)
     Creates child elements, creates children of the children (recursively), and sets attributes of the child elements.
Parameters:
  parent - The configured object for the parent.Must not be null.
Parameters:
  parentWrapper - The wrapper containing child wrappersto be configured.
protected  voidhandleErrorFlush(String output)
     Handles error output sent to System.err by this task or its real task.
Parameters:
  output - The error output to log.
protected  voidhandleErrorOutput(String output)
     Handles error output sent to System.err by this task or its real task.
Parameters:
  output - The error output to log.
protected  voidhandleFlush(String output)
     Handles output sent to System.out by this task or its real task.
Parameters:
  output - The output to log.
protected  inthandleInput(byte[] buffer, int offset, int length)
     Delegate to realThing if present and if it as task.
See Also:   Task.handleInput(byte[]intint)
Parameters:
  buffer - the buffer into which data is to be read.
Parameters:
  offset - the offset into the buffer at which data is stored.
Parameters:
  length - the amount of data to read.
protected  voidhandleOutput(String output)
     Handles output sent to System.out by this task or its real task.
Parameters:
  output - The output to log.
protected  ObjectmakeObject(UnknownElement ue, RuntimeConfigurable w)
     Creates a named task or data type.
protected  TaskmakeTask(UnknownElement ue, RuntimeConfigurable w)
     Creates a named task and configures it up to the init() stage.
Parameters:
  ue - The UnknownElement to create the real task for.Must not be null.
Parameters:
  w - Ignored.
public  voidmaybeConfigure()
     Creates the real object instance and child elements, then configures the attributes and text of the real object.
public  voidsetNamespace(String namespace)
     Set the namespace of the XML element associated with this component.
public  voidsetQName(String qname)
     Set the namespace qname of the XML element.
public  voidsetRealThing(Object realThing)
    
public  booleansimilar(Object obj)
    


Constructor Detail
UnknownElement
public UnknownElement(String elementName)(Code)
Creates an UnknownElement for the given element name.
Parameters:
  elementName - The name of the unknown element.Must not be null.




Method Detail
addChild
public void addChild(UnknownElement child)(Code)
Adds a child element to this element.
Parameters:
  child - The child element to add. Must not be null.



applyPreSet
public void applyPreSet(UnknownElement u)(Code)
This is used then the realobject of the UE is a PreSetDefinition. This is also used when a presetdef is used on a presetdef The attributes, elements and text are applied to this UE.
Parameters:
  u - an UnknownElement containing the attributes, elements and text



configure
public void configure(Object realObject)(Code)
Configure the given object from this UnknownElement
Parameters:
  realObject - the real object this UnknownElement is representing.



copy
public UnknownElement copy(Project newProject)(Code)
Make a copy of the unknown element and set it in the new project.
Parameters:
  newProject - the project to create the UE in. the copied UE.



execute
public void execute()(Code)
Executes the real object if it's a task. If it's not a task (e.g. a data type) then this method does nothing.



getChildren
public List getChildren()(Code)
the list of nested UnknownElements for this UnknownElement.



getComponentName
protected String getComponentName()(Code)
the component name - uses ProjectHelper#genComponentName()



getNamespace
public String getNamespace()(Code)
Return the namespace of the XML element associated with this component. Namespace URI used in the xmlns declaration.



getNotFoundException
protected BuildException getNotFoundException(String what, String name)(Code)
Returns a very verbose exception for when a task/data type cannot be found.
Parameters:
  what - The kind of thing being created. For example, whena task name could not be found, this would be"task". Should not be null.
Parameters:
  name - The name of the element which could not be found.Should not be null. a detailed description of what might have caused the problem.



getQName
public String getQName()(Code)
Return the qname of the XML element associated with this component. namespace Qname used in the element declaration.



getRealThing
public Object getRealThing()(Code)
Return the configured object the real thing whatever it is
since:
   ant 1.6



getTag
public String getTag()(Code)
Returns the name of the XML element which generated this unknown element. the name of the XML element which generated this unknownelement.



getTask
public Task getTask()(Code)
Returns the task instance after it has been created and if it is a task. a task instance or null if the real object is nota task.



getTaskName
public String getTaskName()(Code)
Returns the name to use in logging messages. the name to use in logging messages.



getWrapper
public RuntimeConfigurable getWrapper()(Code)
Get the RuntimeConfigurable instance for this UnknownElement, containing the configuration information. the configuration info.



handleChildren
protected void handleChildren(Object parent, RuntimeConfigurable parentWrapper) throws BuildException(Code)
Creates child elements, creates children of the children (recursively), and sets attributes of the child elements.
Parameters:
  parent - The configured object for the parent.Must not be null.
Parameters:
  parentWrapper - The wrapper containing child wrappersto be configured. Must not be nullif there are any children.
exception:
  BuildException - if the children cannot be configured.



handleErrorFlush
protected void handleErrorFlush(String output)(Code)
Handles error output sent to System.err by this task or its real task.
Parameters:
  output - The error output to log. Should not be null.



handleErrorOutput
protected void handleErrorOutput(String output)(Code)
Handles error output sent to System.err by this task or its real task.
Parameters:
  output - The error output to log. Should not be null.



handleFlush
protected void handleFlush(String output)(Code)
Handles output sent to System.out by this task or its real task.
Parameters:
  output - The output to log. Should not be null.



handleInput
protected int handleInput(byte[] buffer, int offset, int length) throws IOException(Code)
Delegate to realThing if present and if it as task.
See Also:   Task.handleInput(byte[]intint)
Parameters:
  buffer - the buffer into which data is to be read.
Parameters:
  offset - the offset into the buffer at which data is stored.
Parameters:
  length - the amount of data to read. the number of bytes read.
exception:
  IOException - if the data cannot be read.
since:
   Ant 1.6



handleOutput
protected void handleOutput(String output)(Code)
Handles output sent to System.out by this task or its real task.
Parameters:
  output - The output to log. Should not be null.



makeObject
protected Object makeObject(UnknownElement ue, RuntimeConfigurable w)(Code)
Creates a named task or data type. If the real object is a task, it is configured up to the init() stage.
Parameters:
  ue - The unknown element to create the real object for.Must not be null.
Parameters:
  w - Ignored in this implementation. the task or data type represented by the given unknown element.



makeTask
protected Task makeTask(UnknownElement ue, RuntimeConfigurable w)(Code)
Creates a named task and configures it up to the init() stage.
Parameters:
  ue - The UnknownElement to create the real task for.Must not be null.
Parameters:
  w - Ignored. the task specified by the given unknown element, ornull if the task name is not recognised.



maybeConfigure
public void maybeConfigure() throws BuildException(Code)
Creates the real object instance and child elements, then configures the attributes and text of the real object. This unknown element is then replaced with the real object in the containing target's list of children.
exception:
  BuildException - if the configuration fails



setNamespace
public void setNamespace(String namespace)(Code)
Set the namespace of the XML element associated with this component. This method is typically called by the XML processor. If the namespace is "ant:current", the component helper is used to get the current antlib uri.
Parameters:
  namespace - URI used in the xmlns declaration.



setQName
public void setQName(String qname)(Code)
Set the namespace qname of the XML element. This method is typically called by the XML processor.
Parameters:
  qname - the qualified name of the element



setRealThing
public void setRealThing(Object realThing)(Code)
Set the configured object
Parameters:
  realThing - the configured object
since:
   ant 1.7



similar
public boolean similar(Object obj)(Code)
like contents equals, but ignores project
Parameters:
  obj - the object to check against true if this unknownelement has the same contents the other



Fields inherited from org.apache.tools.ant.Task
protected Target target(Code)(Java Doc)
protected String taskName(Code)(Java Doc)
protected String taskType(Code)(Java Doc)
protected RuntimeConfigurable wrapper(Code)(Java Doc)

Methods inherited from org.apache.tools.ant.Task
final public void bindToOwner(Task owner)(Code)(Java Doc)
public void execute() throws BuildException(Code)(Java Doc)
public Target getOwningTarget()(Code)(Java Doc)
public RuntimeConfigurable getRuntimeConfigurableWrapper()(Code)(Java Doc)
public String getTaskName()(Code)(Java Doc)
public String getTaskType()(Code)(Java Doc)
protected RuntimeConfigurable getWrapper()(Code)(Java Doc)
protected void handleErrorFlush(String output)(Code)(Java Doc)
protected void handleErrorOutput(String output)(Code)(Java Doc)
protected void handleFlush(String output)(Code)(Java Doc)
protected int handleInput(byte[] buffer, int offset, int length) throws IOException(Code)(Java Doc)
protected void handleOutput(String output)(Code)(Java Doc)
public void init() throws BuildException(Code)(Java Doc)
final protected boolean isInvalid()(Code)(Java Doc)
public void log(String msg)(Code)(Java Doc)
public void log(String msg, int msgLevel)(Code)(Java Doc)
public void log(Throwable t, int msgLevel)(Code)(Java Doc)
public void log(String msg, Throwable t, int msgLevel)(Code)(Java Doc)
final void markInvalid()(Code)(Java Doc)
public void maybeConfigure() throws BuildException(Code)(Java Doc)
final public void perform()(Code)(Java Doc)
public void reconfigure()(Code)(Java Doc)
public void setOwningTarget(Target target)(Code)(Java Doc)
public void setRuntimeConfigurableWrapper(RuntimeConfigurable wrapper)(Code)(Java Doc)
public void setTaskName(String name)(Code)(Java Doc)
public void setTaskType(String type)(Code)(Java Doc)

Fields inherited from org.apache.tools.ant.ProjectComponent
protected String description(Code)(Java Doc)
protected Location location(Code)(Java Doc)
protected Project project(Code)(Java Doc)

Methods inherited from org.apache.tools.ant.ProjectComponent
public Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public String getDescription()(Code)(Java Doc)
public Location getLocation()(Code)(Java Doc)
public Project getProject()(Code)(Java Doc)
public void log(String msg)(Code)(Java Doc)
public void log(String msg, int msgLevel)(Code)(Java Doc)
public void setDescription(String desc)(Code)(Java Doc)
public void setLocation(Location location)(Code)(Java Doc)
public void setProject(Project project)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.