Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.ide.extension.spi
Class ExtensionVisitor  view ExtensionVisitor download ExtensionVisitor.java

java.lang.Object
  extended byjavax.ide.extension.ElementVisitor
      extended byjavax.ide.extension.spi.BaseExtensionVisitor
          extended byjavax.ide.extension.spi.ExtensionVisitor

public abstract class ExtensionVisitor
extends BaseExtensionVisitor

Visitor for the root JSR-198 extension element. This is the "entry point" for all manifest processing.


Nested Class Summary
private  class ExtensionVisitor.ClasspathsVisitor
           
private  class ExtensionVisitor.ClasspathVisitor
           
private  class ExtensionVisitor.HooksVisitor
           
 
Field Summary
private  javax.ide.extension.ElementVisitor _classpathsVisitor
           
private  javax.ide.extension.ElementVisitor _classpathVisitor
           
private  javax.ide.extension.ElementVisitor _dependenciesVisitor
           
private  java.util.Collection _extensions
           
private  javax.ide.extension.ElementVisitor _hooksVisitor
           
private  javax.ide.extension.ElementVisitorFactory _hookVisitorFactory
           
private  javax.ide.extension.ElementVisitor _nameVisitor
           
private  javax.ide.extension.ElementVisitor _ownerVisitor
           
private static javax.ide.extension.ElementName CLASSPATH
           
private static javax.ide.extension.ElementName CLASSPATHS
           
private static javax.ide.extension.ElementName HOOKS
           
static java.lang.String KEY_CLASSLOADER
          The key for the ClassLoader to be used to when looking up classes for the current extension.
static java.lang.String KEY_EXTENSION_SOURCE
          The key for the current ExtensionSource instance in the scope data map.
private static javax.ide.extension.ElementName NAME
           
private static javax.ide.extension.ElementName OWNER
           
 
Fields inherited from class javax.ide.extension.spi.BaseExtensionVisitor
ELEMENT
 
Fields inherited from class javax.ide.extension.ElementVisitor
KEY_LOCATOR
 
Constructor Summary
protected ExtensionVisitor(javax.ide.extension.ElementVisitorFactory hookFactory)
           
 
Method Summary
protected abstract  void addToClasspath(javax.ide.extension.Extension ext, java.net.URI entry)
          Add the specified entry to the classpath of the class loader which is loading this extension and its dependent classes.
protected  javax.ide.extension.ElementVisitor createClasspathsVisitor()
           
protected  javax.ide.extension.ElementVisitor createClasspathVisitor()
           
protected  javax.ide.extension.ElementVisitor createDependenciesVisitor()
           
protected  javax.ide.extension.ElementVisitor createHooksVisitor()
           
protected  javax.ide.extension.ElementVisitor createNameVisitor()
           
protected  javax.ide.extension.ElementVisitor createOwnerVisitor()
           
 void end(javax.ide.extension.ElementEndContext end)
          Visit the end tag of an xml element.
protected  java.lang.ClassLoader getClassLoader(javax.ide.extension.Extension extension)
          Get the class loader that should be used by default to load an extension.
protected  DefaultExtension getExtension(javax.ide.extension.ElementContext context)
           
 java.util.Collection getExtensions()
           
protected  ExtensionSource getSource(javax.ide.extension.ElementContext context)
           
 void start(javax.ide.extension.ElementStartContext context)
          Visit the start tag of an xml element.
 
Methods inherited from class javax.ide.extension.spi.BaseExtensionVisitor
processExtension
 
Methods inherited from class javax.ide.extension.ElementVisitor
log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

private static final javax.ide.extension.ElementName NAME

OWNER

private static final javax.ide.extension.ElementName OWNER

HOOKS

private static final javax.ide.extension.ElementName HOOKS

CLASSPATHS

private static final javax.ide.extension.ElementName CLASSPATHS

CLASSPATH

private static final javax.ide.extension.ElementName CLASSPATH

_nameVisitor

private javax.ide.extension.ElementVisitor _nameVisitor

_ownerVisitor

private javax.ide.extension.ElementVisitor _ownerVisitor

_hooksVisitor

private javax.ide.extension.ElementVisitor _hooksVisitor

_classpathsVisitor

private javax.ide.extension.ElementVisitor _classpathsVisitor

_classpathVisitor

private javax.ide.extension.ElementVisitor _classpathVisitor

_dependenciesVisitor

private javax.ide.extension.ElementVisitor _dependenciesVisitor

KEY_EXTENSION_SOURCE

public static final java.lang.String KEY_EXTENSION_SOURCE
The key for the current ExtensionSource instance in the scope data map.

See Also:
Constant Field Values

KEY_CLASSLOADER

public static final java.lang.String KEY_CLASSLOADER
The key for the ClassLoader to be used to when looking up classes for the current extension. This is used by I18NStringVisitor / I18NCharVisitor. If no classloader is in the scope map, the context classloader of the current thread is used.

See Also:
Constant Field Values

_extensions

private java.util.Collection _extensions

_hookVisitorFactory

private final javax.ide.extension.ElementVisitorFactory _hookVisitorFactory
Constructor Detail

ExtensionVisitor

protected ExtensionVisitor(javax.ide.extension.ElementVisitorFactory hookFactory)
Method Detail

getExtensions

public final java.util.Collection getExtensions()

start

public final void start(javax.ide.extension.ElementStartContext context)
Description copied from class: javax.ide.extension.ElementVisitor
Visit the start tag of an xml element.

This implementation does nothing.


end

public final void end(javax.ide.extension.ElementEndContext end)
Description copied from class: javax.ide.extension.ElementVisitor
Visit the end tag of an xml element.

This implementation does nothing.


getExtension

protected final DefaultExtension getExtension(javax.ide.extension.ElementContext context)

getSource

protected final ExtensionSource getSource(javax.ide.extension.ElementContext context)

createNameVisitor

protected javax.ide.extension.ElementVisitor createNameVisitor()

createOwnerVisitor

protected javax.ide.extension.ElementVisitor createOwnerVisitor()

createClasspathsVisitor

protected javax.ide.extension.ElementVisitor createClasspathsVisitor()

createClasspathVisitor

protected javax.ide.extension.ElementVisitor createClasspathVisitor()

createHooksVisitor

protected javax.ide.extension.ElementVisitor createHooksVisitor()

createDependenciesVisitor

protected javax.ide.extension.ElementVisitor createDependenciesVisitor()

getClassLoader

protected java.lang.ClassLoader getClassLoader(javax.ide.extension.Extension extension)
Get the class loader that should be used by default to load an extension.

This implementation returns Thread.currentThread().getContextClassLoader().


addToClasspath

protected abstract void addToClasspath(javax.ide.extension.Extension ext,
                                       java.net.URI entry)
Add the specified entry to the classpath of the class loader which is loading this extension and its dependent classes.