org.datanucleus.util
Class Imports

java.lang.Object
  extended by org.datanucleus.util.Imports

public class Imports
extends java.lang.Object

Utility class handling Imports.


Constructor Summary
Imports()
          Constructor.
 
Method Summary
 void importClass(java.lang.String className)
          Method to import the specified class.
 void importPackage(java.lang.String className)
          Method to import the package given by the specified class.
 void parseImports(java.lang.String imports)
          Utility to parse the imports.
 java.lang.Class resolveClassDeclaration(java.lang.String classDecl, ClassLoaderResolver clr, java.lang.ClassLoader primaryClassLoader)
          Utility to resolve a class declaration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Imports

public Imports()
Constructor.

Method Detail

importPackage

public void importPackage(java.lang.String className)
Method to import the package given by the specified class.

Parameters:
className - The class name

importClass

public void importClass(java.lang.String className)
Method to import the specified class.

Parameters:
className - Class to import

parseImports

public void parseImports(java.lang.String imports)
Utility to parse the imports.

Parameters:
imports - The Imports string
Throws:
NucleusUserException - when finding an invalid declaration

resolveClassDeclaration

public java.lang.Class resolveClassDeclaration(java.lang.String classDecl,
                                               ClassLoaderResolver clr,
                                               java.lang.ClassLoader primaryClassLoader)
Utility to resolve a class declaration.

Parameters:
classDecl - The class declaration
clr - ClassLoaderResolver
primaryClassLoader - The primary ClassLoader for the class
Returns:
The class
Throws:
ClassNotResolvedException
NucleusUserException - if a type is duplicately defined


Copyright © 2011. All Rights Reserved.