org.hibernate.jpamodelgen.annotation.AnnotationMetaMap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-jpamodelgen-jakarta Show documentation
Show all versions of hibernate-jpamodelgen-jakarta Show documentation
Annotation Processor to generate JPA 3 static metamodel classes
The newest version!
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.jpamodelgen.annotation;
import javax.lang.model.element.Element;
/**
* @author Max Andersen
* @author Hardy Ferentschik
* @author Emmanuel Bernard
*/
public class AnnotationMetaMap extends AnnotationMetaCollection {
private final String keyType;
public AnnotationMetaMap(AnnotationMetaEntity parent, Element element, String collectionType,
String keyType, String elementType) {
super( parent, element, collectionType, elementType );
this.keyType = keyType;
}
@Override
public String getAttributeDeclarationString() {
return "public static volatile " + getHostingEntity().importType( getMetaType() )
+ "<" + getHostingEntity().importType( getHostingEntity().getQualifiedName() )
+ ", " + getHostingEntity().importType( keyType ) + ", "
+ getHostingEntity().importType( getTypeDeclaration() ) + "> "
+ getPropertyName() + ";";
}
}