Apache Tuscany SCA Kernel Sub-Project

org.apache.tuscany.spi.loader
Class LoaderUtil

java.lang.Object
  extended by org.apache.tuscany.spi.loader.LoaderUtil

public final class LoaderUtil
extends Object

Utility functions to support loader implementations.

Version:
$Rev: 430937 $ $Date: 2006-08-11 18:17:56 -0700 (Fri, 11 Aug 2006) $

Method Summary
static Class<?> loadClass(String name, ClassLoader cl)
          Load the class using the supplied ClassLoader.
static void skipToEndElement(javax.xml.stream.XMLStreamReader reader)
          Advance the stream to the next END_ELEMENT event skipping any nested content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

skipToEndElement

public static void skipToEndElement(javax.xml.stream.XMLStreamReader reader)
                             throws javax.xml.stream.XMLStreamException
Advance the stream to the next END_ELEMENT event skipping any nested content.

Parameters:
reader - the reader to advance
Throws:
javax.xml.stream.XMLStreamException - if there was a problem reading the stream

loadClass

public static Class<?> loadClass(String name,
                                 ClassLoader cl)
                          throws MissingResourceException
Load the class using the supplied ClassLoader. The class will be defined so any initializers present will be fired. As the class is being loaded, the Thread context ClassLoader will be set to the supplied classloader.

Parameters:
name - the name of the class to load
cl - the classloader to use to load it
Returns:
the class
Throws:
MissingResourceException - if the class could not be found

Apache Tuscany SCA Kernel Sub-Project

-