org.hibernate.jpamodelgen.annotation
Class AnnotationMetaEntity
java.lang.Object
org.hibernate.jpamodelgen.annotation.AnnotationMetaEntity
- All Implemented Interfaces:
- ImportContext, MetaEntity
- Direct Known Subclasses:
- AnnotationEmbeddable
public class AnnotationMetaEntity
- extends java.lang.Object
- implements MetaEntity
Class used to collect meta information about an annotated entity.
- Author:
- Max Andersen, Hardy Ferentschik, Emmanuel Bernard
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AnnotationMetaEntity
public AnnotationMetaEntity(javax.lang.model.element.TypeElement element,
Context context)
AnnotationMetaEntity
protected AnnotationMetaEntity(javax.lang.model.element.TypeElement element,
Context context,
boolean lazilyInitialised)
getEntityAccessTypeInfo
public AccessTypeInformation getEntityAccessTypeInfo()
getContext
public final Context getContext()
getSimpleName
public final java.lang.String getSimpleName()
- Specified by:
getSimpleName in interface MetaEntity
getQualifiedName
public final java.lang.String getQualifiedName()
- Specified by:
getQualifiedName in interface MetaEntity
getPackageName
public final java.lang.String getPackageName()
- Specified by:
getPackageName in interface MetaEntity
getMembers
public java.util.List<MetaAttribute> getMembers()
- Specified by:
getMembers in interface MetaEntity
isMetaComplete
public boolean isMetaComplete()
- Specified by:
isMetaComplete in interface MetaEntity
mergeInMembers
public void mergeInMembers(java.util.Collection<MetaAttribute> attributes)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getElement
protected javax.lang.model.element.TypeElement getElement()
init
protected final void init()
generateImports
public final java.lang.String generateImports()
- Specified by:
generateImports in interface ImportContext- Specified by:
generateImports in interface MetaEntity
importType
public final java.lang.String importType(java.lang.String fqcn)
- Description copied from interface:
ImportContext
- Add fqcn to the import list. Returns fqcn as needed in source code.
Attempts to handle fqcn with array and generics references.
e.g.
java.util.Collection imports java.util.Collection and returns Collection
org.marvel.Hulk[] imports org.marvel.Hulk and returns Hulk
- Specified by:
importType in interface ImportContext- Specified by:
importType in interface MetaEntity
- Parameters:
fqcn - Fully qualified class name of the type to import.
- Returns:
- import string
staticImport
public final java.lang.String staticImport(java.lang.String fqcn,
java.lang.String member)
- Specified by:
staticImport in interface ImportContext- Specified by:
staticImport in interface MetaEntity
importType
public final java.lang.String importType(javax.lang.model.element.Name qualifiedName)
- Specified by:
importType in interface MetaEntity
getTypeElement
public final javax.lang.model.element.TypeElement getTypeElement()
- Specified by:
getTypeElement in interface MetaEntity
Copyright © 2009-2010. All Rights Reserved.