METAGEN-21

This commit is contained in:
Hardy Ferentschik 2010-01-26 17:48:54 +00:00 committed by Strong Liu
parent 3088900b2a
commit 6f3b00354d
2 changed files with 5 additions and 3 deletions

View File

@ -35,7 +35,7 @@ import org.hibernate.jpamodelgen.util.TypeUtils;
* @author Emmanuel Bernard
*/
public class Context {
private static final String DEBUG_PARAMETER = "debug";
private final Map<String, MetaEntity> metaEntitiesToProcess = new HashMap<String, MetaEntity>();
private final Map<String, MetaEntity> metaSuperclassAndEmbeddableToProcess = new HashMap<String, MetaEntity>();
@ -53,7 +53,7 @@ public class Context {
public Context(ProcessingEnvironment pe) {
this.pe = pe;
String debugParam = pe.getOptions().get( DEBUG_PARAMETER );
String debugParam = pe.getOptions().get( JPAMetaModelEntityProcessor.DEBUG_OPTION );
if ( debugParam != null && "true".equals( debugParam ) ) {
logDebug = true;
}

View File

@ -23,6 +23,7 @@ import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedOptions;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.Element;
@ -48,8 +49,9 @@ import static javax.lang.model.SourceVersion.RELEASE_6;
*/
@SupportedAnnotationTypes("*")
@SupportedSourceVersion(RELEASE_6)
@SupportedOptions({ JPAMetaModelEntityProcessor.DEBUG_OPTION })
public class JPAMetaModelEntityProcessor extends AbstractProcessor {
public static final String DEBUG_OPTION = "debug";
private static final Boolean ALLOW_OTHER_PROCESSORS_TO_CLAIM_ANNOTATIONS = Boolean.FALSE;
private boolean xmlProcessed = false;