Package org.datanucleus.util
Class Imports
java.lang.Object
org.datanucleus.util.Imports
Utility class handling Imports.
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
importClass
(String className) Method to import the specified class.void
importPackage
(String className) Method to import the package given by the specified class.void
parseImports
(String imports) Utility to parse the imports.resolveClassDeclaration
(String classDecl, ClassLoaderResolver clr, ClassLoader primaryClassLoader) Utility to resolve a class declaration.
-
Field Details
-
primitives
-
importedClassesByName
-
importedPackageNames
-
-
Constructor Details
-
Imports
public Imports()Constructor.
-
-
Method Details
-
importPackage
Method to import the package given by the specified class.- Parameters:
className
- The class name
-
importClass
Method to import the specified class.- Parameters:
className
- Class to import
-
parseImports
Utility to parse the imports.- Parameters:
imports
- The Imports string- Throws:
NucleusUserException
- when finding an invalid declaration
-
resolveClassDeclaration
public Class resolveClassDeclaration(String classDecl, ClassLoaderResolver clr, ClassLoader primaryClassLoader) Utility to resolve a class declaration.- Parameters:
classDecl
- The class declarationclr
- ClassLoaderResolverprimaryClassLoader
- The primary ClassLoader for the class- Returns:
- The class
- Throws:
ClassNotResolvedException
- If there is a problem loading the classNucleusUserException
- if a type is duplicately defined
-