Package org.hibernate.processor
Class ImportContextImpl
- java.lang.Object
- org.hibernate.processor.ImportContextImpl
- All Implemented Interfaces:
ImportContext
public classImportContextImplextendsObjectimplementsImportContext
Constructor Summary
Constructors Constructor Description ImportContextImpl(String basePackage)
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgenerateImports()StringimportType(String typeExpression)Add fqcn to the import list.staticStringqualifier(String qualifiedName)StringstaticImport(String fqcn,String member)staticStringunqualify(String qualifiedName)
Constructor Detail
ImportContextImpl
public ImportContextImpl(String basePackage)
Method Detail
importType
public String importType(String typeExpression)
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<org.marvel.Hulk>importsjava.util.Collectionand returnsCollectionorg.marvel.Hulk[]importsorg.marvel.Hulkand returnsHulk- Specified by:
importTypein interfaceImportContext- Parameters:
typeExpression- A type expression- Returns:
- import string
staticImport
public String staticImport(String fqcn,String member)
- Specified by:
staticImportin interfaceImportContext
generateImports
public String generateImports()
- Specified by:
generateImportsin interfaceImportContext