Top Description Fields Constructors Methods
org.eclipse.persistence.tools.weaving.jpa

public Class StaticWeave

extends Object
Class Inheritance
Imports
java.io.File, .FileWriter, .PrintStream, .Writer, java.net.MalformedURLException, .URL, .URLClassLoader, org.eclipse.persistence.exceptions.StaticWeaveException, org.eclipse.persistence.internal.helper.Helper, org.eclipse.persistence.internal.localization.ToStringLocalization, org.eclipse.persistence.logging.AbstractSessionLog, .SessionLog

Description: This is the static weave command line processing class that verifies command options and invokes StaticWeaveProcessor to statically weave the classes.

 Usage:
  StaticWeave [options] source target
 Options:
  -classpath
    Set the user class path, use ";" as the delimiter in Window system and ":" in Unix system.
  -log
    The path of log file, the standard output will be the default.
  -loglevel
    Specify a literal value for eclipselink log level(OFF,SEVERE,WARNING,INFO,CONFIG,FINE,FINER,FINEST). The default value is OFF.
  -persistenceinfo
    The path contains META-INF/persistence.xml. This is ONLY required when the source does not include it.  The classpath must contain all the classes necessary in oder to perform weaving.

 The weaving will be performed in place if source and target point to the same location. Weaving in place is ONLY applicable for directory-based sources.
Example:
 To weave all entities contained in c:\foo-source.jar with its persistence.xml contained within c:\foo-containing-persistence-xml.jar, and output to c:\\foo-target.jar,
 StaticWeave -persistenceinfo c:\foo-containing-persistencexml.jar -classpath c:\classpath1;c:\classpath2 c:\foo-source.jar c:\foo-target.jar

Field Summary

Modifier and TypeField and Description
private String[]
private String[]
private int
private Writer
private String
private String
private String
private String
private PrintStream

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private ClassLoader
public static void
main(String[] argv)

private void
pack-priv void
public void
start()

Invoke StaticWeaveProcessor to perform weaving.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

argvback to summary
private String[] argv
classpathsback to summary
private String[] classpaths
loglevelback to summary
private int loglevel
logWriterback to summary
private Writer logWriter
persistenceinfopathback to summary
private String persistenceinfopath
persistenceXmlLocationback to summary
private String persistenceXmlLocation
sourceback to summary
private String source
targetback to summary
private String target
voutback to summary
private PrintStream vout

Constructor Detail

StaticWeaveback to summary
public StaticWeave(String[] argv)

Method Detail

getClassLoaderback to summary
private ClassLoader getClassLoader() throws MalformedURLException
Annotations
@SuppressWarnings:deprecation
mainback to summary
public static void main(String[] argv)
printUsageback to summary
private void printUsage()
processCommandLineback to summary
pack-priv void processCommandLine() throws Exception
startback to summary
public void start() throws Exception

Invoke StaticWeaveProcessor to perform weaving.