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

Quick Search    Search Deep

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

java.lang.Object
  extended byjavax.ide.extension.spi.DefaultHookVisitorFactory
All Implemented Interfaces:
javax.ide.extension.ElementVisitorFactory

public class DefaultHookVisitorFactory
extends java.lang.Object
implements javax.ide.extension.ElementVisitorFactory

The default implementation of the visitor factory for hooks. This implementation returns the default implementations of all standard hooks defined by the JSR-198 spec and provides a registerHookVisitor() method used by the hook-handler-hook to register custom hooks declared in the manifest.


Field Summary
private  java.util.Map _hookVisitors
           
 
Constructor Summary
DefaultHookVisitorFactory()
          Constructs the default hook visitor factory.
 
Method Summary
protected  javax.ide.extension.ExtensionHook createBuildSystemHook()
          Create the build system hook.
protected  javax.ide.extension.ExtensionHook createDocumentHook()
          Create the document hook.
protected  javax.ide.extension.ExtensionHook createEditorHook()
           
protected  javax.ide.extension.ExtensionHook createFeatureHook()
          Create the feature hook.
protected  javax.ide.extension.ExtensionHook createHookHandlerHook()
          Create the hook handler hook.
protected  javax.ide.extension.ExtensionHook createIdeListenerHook()
          Create the IDE Listener hook.
protected  javax.ide.extension.ExtensionHook createLogHook()
          Create the log hook.
protected  javax.ide.extension.ExtensionHook createMenuHook()
          Create the menu hook.
protected  javax.ide.extension.ExtensionHook createPropertyHook()
          Create the property hook.
protected  javax.ide.extension.ExtensionHook createVFSHook()
          Create the VFS hook.
protected  javax.ide.extension.ExtensionHook createWizardHook()
          Create the wizard hook.
 javax.ide.extension.ElementVisitor getVisitor(javax.ide.extension.ElementName name)
          Get a suitable visitor for the specified element name.
(package private)  boolean isNameRegistered(javax.ide.extension.ElementName name)
          Get whether there is a registered visitor for the specified hook element name.
(package private)  void registerHook(javax.ide.extension.ElementName name, javax.ide.extension.ExtensionHook hook)
          Register the specified hook visitor.
protected  void registerStandardVisitors()
          Register hooks defined in the JSR-198 spec.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_hookVisitors

private final java.util.Map _hookVisitors
Constructor Detail

DefaultHookVisitorFactory

public DefaultHookVisitorFactory()
Constructs the default hook visitor factory. This implementation calls registerStandardVisitors() 55 .

Method Detail

registerStandardVisitors

protected final void registerStandardVisitors()
Register hooks defined in the JSR-198 spec. Unlike user defined hooks, these are always present and hence statically registered rather than registered via an extension manifest.

This implementation calls the following methods in sequence:


createEditorHook

protected javax.ide.extension.ExtensionHook createEditorHook()

createVFSHook

protected javax.ide.extension.ExtensionHook createVFSHook()
Create the VFS hook. This implementation returns a new instance of javax.ide.net.spi.VFSHook.


createHookHandlerHook

protected javax.ide.extension.ExtensionHook createHookHandlerHook()
Create the hook handler hook. This implementation returns a new instance of javax.ide.extension.spi.HookHandlerHook.


createWizardHook

protected javax.ide.extension.ExtensionHook createWizardHook()
Create the wizard hook. This implementation returns a new instance of javax.ide.wizard.spi.WizardHook.


createIdeListenerHook

protected javax.ide.extension.ExtensionHook createIdeListenerHook()
Create the IDE Listener hook. This implementation returns a new instance of javax.ide.spi.IDEListenerHook.


createPropertyHook

protected javax.ide.extension.ExtensionHook createPropertyHook()
Create the property hook. This implementation returns a new instance of javax.ide.property.spi.PropertyHook.


createDocumentHook

protected javax.ide.extension.ExtensionHook createDocumentHook()
Create the document hook. This implementation returns a new instance of javax.ide.model.spi.DocumentHook.


createMenuHook

protected javax.ide.extension.ExtensionHook createMenuHook()
Create the menu hook. This implementation returns a new instance of javax.ide.menu.spi.MenuHook.


createLogHook

protected javax.ide.extension.ExtensionHook createLogHook()
Create the log hook. This implementation returns a new instance of javax.ide.extension.spi.LogHook.


createFeatureHook

protected javax.ide.extension.ExtensionHook createFeatureHook()
Create the feature hook. This implementation returns a new instance of javax.ide.extension.spi.FeatureHook.


createBuildSystemHook

protected javax.ide.extension.ExtensionHook createBuildSystemHook()
Create the build system hook. This implementation returns a new instance of javax.ide.build.spi.BuildSystemHook.


getVisitor

public final javax.ide.extension.ElementVisitor getVisitor(javax.ide.extension.ElementName name)
Description copied from interface: javax.ide.extension.ElementVisitorFactory
Get a suitable visitor for the specified element name.

Specified by:
getVisitor in interface javax.ide.extension.ElementVisitorFactory

isNameRegistered

boolean isNameRegistered(javax.ide.extension.ElementName name)
Get whether there is a registered visitor for the specified hook element name.


registerHook

final void registerHook(javax.ide.extension.ElementName name,
                        javax.ide.extension.ExtensionHook hook)
Register the specified hook visitor. This is typically used by the hook-handler-hook to register custom hooks provided by extension developers.