@SupportedAnnotationTypes(value={"javax.persistence.Entity","javax.persistence.Embeddable","javax.persistence.MappedSuperclass"}) @SupportedOptions(value={"openjpa.log","openjpa.source","openjpa.naming","openjpa.header","openjpa.metamodel"}) @SupportedSourceVersion(value=RELEASE_6) public class AnnotationProcessor6 extends AbstractProcessor
This tool is invoked during compilation for JDK6 compiler if
-Aopenjpa.metamodel=true
is specified.
$ javac -classpath path/to/openjpa-all.jar -Aopenjpa.metamodel=true mypackage/MyEntity.java
mypackage.MyEntity_.java
.
The source code is generated relative to the directory specified in -s
option
of javac
compiler and defaulted to the current directory.
The Annotation Processor also recognizes the following options (none of them are mandatory):
-Aopenjpa.log={log level} | The logging level. Default is WARN . Permissible values are
TRACE , INFO , WARN or ERROR .
|
-Aopenjpa.source={n} | Java source version of the generated code. Default is 6 .
|
-Aopenjpa.naming={class name} | fully-qualified name of a class implementing
org.apache.openjpa.meta.MetaDataFactory that determines
the name of a meta-class given the name of the original persistent Java entity class. Defaults to
org.apache.openjpa.persistence.PersistenceMetaDataFactory which appends a underscore character
(_ ) to the original Java class name.
|
-Aopenjpa.header={url} |
A url whose content will appear as comment header to the generated file(s). Recognizes special value
ASL for Apache Source License header as comment. By default adds a OpenJPA proprietary
text.
|
processingEnv
Constructor and Description |
---|
AnnotationProcessor6() |
Modifier and Type | Method and Description |
---|---|
void |
init(ProcessingEnvironment processingEnv)
Initialization.
|
boolean |
process(Set<? extends TypeElement> annos,
RoundEnvironment roundEnv)
The entry point for java compiler.
|
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, isInitialized
public void init(ProcessingEnvironment processingEnv)
init
in interface Processor
init
in class AbstractProcessor
public boolean process(Set<? extends TypeElement> annos, RoundEnvironment roundEnv)
process
in interface Processor
process
in class AbstractProcessor
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.