Class Imports

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

public class Imports extends Object
Utility class handling Imports.
  • Field Details

  • Constructor Details

    • Imports

      public Imports()
      Constructor.
  • Method Details

    • 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 declaration
      clr - ClassLoaderResolver
      primaryClassLoader - The primary ClassLoader for the class
      Returns:
      The class
      Throws:
      ClassNotResolvedException - If there is a problem loading the class
      NucleusUserException - if a type is duplicately defined