org.hibernate.jpamodelgen.annotation
Class AnnotationMetaEntity

java.lang.Object
  extended by org.hibernate.jpamodelgen.annotation.AnnotationMetaEntity
All Implemented Interfaces:
ImportContext, MetaEntity
Direct Known Subclasses:
AnnotationEmbeddable

public class AnnotationMetaEntity
extends Object
implements MetaEntity

Class used to collect meta information about an annotated entity.

Author:
Max Andersen, Hardy Ferentschik, Emmanuel Bernard

Constructor Summary
  AnnotationMetaEntity(TypeElement element, Context context)
           
protected AnnotationMetaEntity(TypeElement element, Context context, boolean lazilyInitialised)
           
 
Method Summary
 String generateImports()
           
 Context getContext()
           
protected  TypeElement getElement()
           
 AccessTypeInformation getEntityAccessTypeInfo()
           
 List<MetaAttribute> getMembers()
           
 String getPackageName()
           
 String getQualifiedName()
           
 String getSimpleName()
           
 TypeElement getTypeElement()
           
 String importType(String fqcn)
          Add fqcn to the import list.
protected  void init()
           
 boolean isMetaComplete()
           
 void mergeInMembers(Collection<MetaAttribute> attributes)
           
 String staticImport(String fqcn, String member)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnnotationMetaEntity

public AnnotationMetaEntity(TypeElement element,
                            Context context)

AnnotationMetaEntity

protected AnnotationMetaEntity(TypeElement element,
                               Context context,
                               boolean lazilyInitialised)
Method Detail

getEntityAccessTypeInfo

public AccessTypeInformation getEntityAccessTypeInfo()

getContext

public final Context getContext()

getSimpleName

public final String getSimpleName()
Specified by:
getSimpleName in interface MetaEntity

getQualifiedName

public final String getQualifiedName()
Specified by:
getQualifiedName in interface MetaEntity

getPackageName

public final String getPackageName()
Specified by:
getPackageName in interface MetaEntity

getMembers

public List<MetaAttribute> getMembers()
Specified by:
getMembers in interface MetaEntity

isMetaComplete

public boolean isMetaComplete()
Specified by:
isMetaComplete in interface MetaEntity

mergeInMembers

public void mergeInMembers(Collection<MetaAttribute> attributes)

generateImports

public final String generateImports()
Specified by:
generateImports in interface ImportContext
Specified by:
generateImports in interface MetaEntity

importType

public final String importType(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 String staticImport(String fqcn,
                                 String member)
Specified by:
staticImport in interface ImportContext
Specified by:
staticImport in interface MetaEntity

getTypeElement

public final TypeElement getTypeElement()
Specified by:
getTypeElement in interface MetaEntity

toString

public String toString()
Overrides:
toString in class Object

getElement

protected TypeElement getElement()

init

protected final void init()


Copyright © 2009-2012. All Rights Reserved.