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
- Author:
- Max Andersen, Hardy Ferentschik, Emmanuel Bernard
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
importContext
protected final ImportContext importContext
element
protected final javax.lang.model.element.TypeElement element
members
protected final java.util.Map<java.lang.String,MetaAttribute> members
context
protected Context context
AnnotationMetaEntity
public AnnotationMetaEntity(javax.lang.model.element.TypeElement element,
Context context)
AnnotationMetaEntity
protected AnnotationMetaEntity(javax.lang.model.element.TypeElement element,
Context context,
boolean lazilyInitialised)
getContext
public Context getContext()
getSimpleName
public java.lang.String getSimpleName()
- Specified by:
getSimpleName
in interface MetaEntity
getQualifiedName
public java.lang.String getQualifiedName()
- Specified by:
getQualifiedName
in interface MetaEntity
getPackageName
public 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
init
protected void init()
generateImports
public java.lang.String generateImports()
- Specified by:
generateImports
in interface ImportContext
- Specified by:
generateImports
in interface MetaEntity
importType
public 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 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 java.lang.String importType(javax.lang.model.element.Name qualifiedName)
- Specified by:
importType
in interface MetaEntity
getTypeElement
public javax.lang.model.element.TypeElement getTypeElement()
- Specified by:
getTypeElement
in interface MetaEntity
Copyright © 2009-2010. All Rights Reserved.