Tabnine Logo
ObjectUtilities.loadAndInstantiate
Code IndexAdd Tabnine to your IDE (free)

How to use
loadAndInstantiate
method
in
org.jfree.util.ObjectUtilities

Best Java code snippets using org.jfree.util.ObjectUtilities.loadAndInstantiate (Showing top 6 results out of 315)

origin: org.jfree/com.springsource.org.jfree

protected void performExternalInitialize(final String classname, final Class context)
  throws ModuleInitializeException
{
 try
 {
  final ModuleInitializer mi =
    (ModuleInitializer) ObjectUtilities.loadAndInstantiate(classname, context, ModuleInitializer.class);
  if (mi == null)
  {
   throw new ModuleInitializeException("Failed to load specified initializer class.");
  }
  mi.performInit();
 }
 catch (ModuleInitializeException mie)
 {
  throw mie;
 }
 catch (Exception e)
 {
  throw new ModuleInitializeException("Failed to load specified initializer class.", e);
 }
}
origin: jfree/jcommon

/**
 * ???.
 *
 * @param classname ?
 * @param context ?
 * @throws ModuleInitializeException
 */
protected void performExternalInitialize(final String classname, final Class context)
  throws ModuleInitializeException
{
 try
 {
  final ModuleInitializer mi =
    (ModuleInitializer) ObjectUtilities.loadAndInstantiate(classname, context, ModuleInitializer.class);
  if (mi == null)
  {
   throw new ModuleInitializeException("Failed to load specified initializer class.");
  }
  mi.performInit();
 }
 catch (ModuleInitializeException mie)
 {
  throw mie;
 }
 catch (Exception e)
 {
  throw new ModuleInitializeException("Failed to load specified initializer class.", e);
 }
}
origin: org.jfree/jcommon

/**
 * Tries to load an module initializer and uses this initializer to initialize
 * the module.
 *
 * @param classname the class name of the initializer.
 * @throws ModuleInitializeException if an error occures
 * @deprecated Use the method that provides a class-context instead.
 */
protected void performExternalInitialize(final String classname)
  throws ModuleInitializeException
{
 try
 {
  final ModuleInitializer mi =
    (ModuleInitializer) ObjectUtilities.loadAndInstantiate(classname, AbstractModule.class, ModuleInitializer.class);
  if (mi == null)
  {
   throw new ModuleInitializeException("Failed to load specified initializer class.");
  }
  mi.performInit();
 }
 catch (ModuleInitializeException mie)
 {
  throw mie;
 }
 catch (Exception e)
 {
  throw new ModuleInitializeException("Failed to load specified initializer class.", e);
 }
}
origin: jfree/jcommon

/**
 * Tries to load an module initializer and uses this initializer to initialize
 * the module.
 *
 * @param classname the class name of the initializer.
 * @throws ModuleInitializeException if an error occures
 * @deprecated Use the method that provides a class-context instead.
 */
protected void performExternalInitialize(final String classname)
  throws ModuleInitializeException
{
 try
 {
  final ModuleInitializer mi =
    (ModuleInitializer) ObjectUtilities.loadAndInstantiate(classname, AbstractModule.class, ModuleInitializer.class);
  if (mi == null)
  {
   throw new ModuleInitializeException("Failed to load specified initializer class.");
  }
  mi.performInit();
 }
 catch (ModuleInitializeException mie)
 {
  throw mie;
 }
 catch (Exception e)
 {
  throw new ModuleInitializeException("Failed to load specified initializer class.", e);
 }
}
origin: org.jfree/jcommon

/**
 * ???.
 *
 * @param classname ?
 * @param context ?
 * @throws ModuleInitializeException if there is an initialisation error.
 */
protected void performExternalInitialize(final String classname, final Class context)
  throws ModuleInitializeException
{
 try
 {
  final ModuleInitializer mi =
    (ModuleInitializer) ObjectUtilities.loadAndInstantiate(classname, context, ModuleInitializer.class);
  if (mi == null)
  {
   throw new ModuleInitializeException("Failed to load specified initializer class.");
  }
  mi.performInit();
 }
 catch (ModuleInitializeException mie)
 {
  throw mie;
 }
 catch (Exception e)
 {
  throw new ModuleInitializeException("Failed to load specified initializer class.", e);
 }
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Tries to load an module initializer and uses this initializer to initialize
 * the module.
 *
 * @param classname the class name of the initializer.
 * @throws ModuleInitializeException if an error occures
 * @deprecated Use the method that provides a class-context instead.
 */
protected void performExternalInitialize(final String classname)
  throws ModuleInitializeException
{
 try
 {
  final ModuleInitializer mi =
    (ModuleInitializer) ObjectUtilities.loadAndInstantiate(classname, AbstractModule.class, ModuleInitializer.class);
  if (mi == null)
  {
   throw new ModuleInitializeException("Failed to load specified initializer class.");
  }
  mi.performInit();
 }
 catch (ModuleInitializeException mie)
 {
  throw mie;
 }
 catch (Exception e)
 {
  throw new ModuleInitializeException("Failed to load specified initializer class.", e);
 }
}
org.jfree.utilObjectUtilitiesloadAndInstantiate

Javadoc

Tries to create a new instance of the given class. This is a short cut for the common bean instantiation code.

Popular methods of ObjectUtilities

  • equal
    Returns true if the two objects are equal OR bothnull.
  • clone
    Returns a clone of the specified object, if it can be cloned, otherwise throws a CloneNotSupportedEx
  • convertName
    Transform the class-relative resource name into a global name by appending it to the classes package
  • getClassLoader
    Returns the classloader, which was responsible for loading the given class.
  • getClassLoaderSource
    Returns the internal configuration entry, whether the classloader of the thread context or the conte
  • getResource
    Returns the resource specified by the absolute name.
  • getResourceRelative
    Returns the resource specified by the relative name.
  • getResourceRelativeAsStream
    Returns the inputstream for the resource specified by therelative name.
  • parseVersions
  • setClassLoaderSource
    Defines the internal configuration entry, whether the classloader of the thread context or the conte
  • deepClone
    Returns a new collection containing clones of all the items in the specified collection.
  • hashCode
    Returns a hash code for an object, or zero if the object isnull.
  • deepClone,
  • hashCode

Popular in Java

  • Parsing JSON documents to java classes using gson
  • compareTo (BigDecimal)
  • setScale (BigDecimal)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now