Package org.hibernate.jpamodelgen
Class ImportContextImpl
- java.lang.Object
-
- org.hibernate.jpamodelgen.ImportContextImpl
-
- All Implemented Interfaces:
ImportContext
public class ImportContextImpl extends java.lang.Object implements ImportContext
-
-
Constructor Summary
Constructors Constructor Description ImportContextImpl(java.lang.String basePackage)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgenerateImports()java.lang.StringimportType(java.lang.String fqcn)Add fqcn to the import list.static java.lang.Stringqualifier(java.lang.String qualifiedName)java.lang.StringstaticImport(java.lang.String fqcn, java.lang.String member)static java.lang.Stringunqualify(java.lang.String qualifiedName)
-
-
-
Method Detail
-
importType
public java.lang.String importType(java.lang.String fqcn)
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:
fqcn- Fully qualified class name- Returns:
- import string
-
staticImport
public java.lang.String staticImport(java.lang.String fqcn, java.lang.String member)- Specified by:
staticImportin interfaceImportContext
-
generateImports
public java.lang.String generateImports()
- Specified by:
generateImportsin interfaceImportContext
-
unqualify
public static java.lang.String unqualify(java.lang.String qualifiedName)
-
qualifier
public static java.lang.String qualifier(java.lang.String qualifiedName)
-
-