Package org.datanucleus.util
Class Imports
- java.lang.Object
-
- org.datanucleus.util.Imports
-
public class Imports extends Object
Utility class handling Imports.
-
-
Constructor Summary
Constructors Constructor Description Imports()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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.Class
resolveClassDeclaration(String classDecl, ClassLoaderResolver clr, ClassLoader primaryClassLoader)
Utility to resolve a class declaration.
-
-
-
Method Detail
-
importPackage
public void importPackage(String className)
Method to import the package given by the specified class.- Parameters:
className
- The class name
-
importClass
public void importClass(String className)
Method to import the specified class.- Parameters:
className
- Class to import
-
parseImports
public void parseImports(String imports)
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
-
-