Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


org.eclipse.persistence.tools.weaving.jpa
Class StaticWeaveAntTask

java.lang.Object
  extended by org.apache.tools.ant.Task
      extended by org.eclipse.persistence.tools.weaving.jpa.StaticWeaveAntTask


public class StaticWeaveAntTask
extends org.apache.tools.ant.Task

Description: This is the static weave ant task definition class that verifies the value of specified attributes and invokes StaticWeaveProcessor to weave classes.

Usage:

Example:
<target name="define_task" description="New task definition for EclipseLink static weaving"/>
  <taskdef name="weave" classname="org_eclipse_persistence_tools_weaving_jpa_StaticWeaveAntTask"/>
</target>
<target name="weaving" description="perform weaving." depends="define.task">
  <weave source= "c:\foo.jar" target = "c:\wovenfoo.jar" persistenceinfo="c:\foo-containing-persistenceinfo.jar">
    <classpath>
      <pathelement path="c:\foo-dependent.jar"/>
    </classpath>
  </weave>
</target>


Field Summary
private  java.util.Vector classPaths
           
private  int logLevel
           
private  java.io.Writer logWriter
           
private  java.lang.String persistenceinfo
           
private  java.lang.String persistencexml
           
private  java.lang.String source
           
private  java.lang.String target
           

 

Fields inherited from class org.apache.tools.ant.Task
description, location, project, taskName, taskType, wrapper

 

Constructor Summary
StaticWeaveAntTask()
           

 

Method Summary
 void addClasspath(org.apache.tools.ant.types.Path path)
          Add the dependent classpath in order to load classes from the specified input jar.
 void execute()
          Execute ant task.
private  java.util.Vector getPathElement()
          Parse the class path element and store them into vector.
private  java.net.URL[] getURLs()
          Convert the path element into the URL which further pass into the classloader.
 void setLog(java.lang.String logFile)
          Set the log file.
 void setLogLevel(java.lang.String logLevel)
           
 void setPersistenceinfo(java.lang.String persistenceinfo)
           
 void setpersistencexml(java.lang.String persistenceXMLLocation)
           
 void setSource(java.lang.String source)
          Set the input archive to be used to weave.
 void setTarget(java.lang.String target)
          Set output archive to be used to weave to.
private  void start()
          Invoke weaving process.
private  void verifyOptions()
          Verify the value of attributes.

 

Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, init, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

source

private java.lang.String source

persistenceinfo

private java.lang.String persistenceinfo

persistencexml

private java.lang.String persistencexml

target

private java.lang.String target

classPaths

private java.util.Vector classPaths

logLevel

private int logLevel

logWriter

private java.io.Writer logWriter

Constructor Detail

StaticWeaveAntTask

public StaticWeaveAntTask()

Method Detail

setSource

public void setSource(java.lang.String source)
Set the input archive to be used to weave.

setTarget

public void setTarget(java.lang.String target)
Set output archive to be used to weave to.

setLog

public void setLog(java.lang.String logFile)
            throws java.io.IOException
Set the log file.
Throws:
java.io.IOException

setLogLevel

public void setLogLevel(java.lang.String logLevel)

setPersistenceinfo

public void setPersistenceinfo(java.lang.String persistenceinfo)

setpersistencexml

public void setpersistencexml(java.lang.String persistenceXMLLocation)

addClasspath

public void addClasspath(org.apache.tools.ant.types.Path path)
Add the dependent classpath in order to load classes from the specified input jar.

getPathElement

private java.util.Vector getPathElement()
Parse the class path element and store them into vector.

getURLs

private java.net.URL[] getURLs()
Convert the path element into the URL which further pass into the classloader.

execute

public void execute()
Execute ant task.
Overrides:
execute in class org.apache.tools.ant.Task

verifyOptions

private void verifyOptions()
                    throws org.apache.tools.ant.BuildException
Verify the value of attributes.
Throws:
org.apache.tools.ant.BuildException

start

private void start()
Invoke weaving process.

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.