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

Quick Search    Search Deep

org.eclipse.core.internal.runtime
Class AdapterFactoryProxy  view AdapterFactoryProxy download AdapterFactoryProxy.java

java.lang.Object
  extended byorg.eclipse.core.internal.runtime.AdapterFactoryProxy
All Implemented Interfaces:
org.eclipse.core.runtime.IAdapterFactory

class AdapterFactoryProxy
extends java.lang.Object
implements org.eclipse.core.runtime.IAdapterFactory

Instances of this class represent adapter factories that have been contributed via the adapters extension point. The concrete factory is not loaded until the factory's plugin is loaded, AND until the factory is requested to supply an adapter.


Field Summary
private  org.eclipse.core.runtime.IConfigurationElement element
           
private  org.eclipse.core.runtime.IAdapterFactory factory
          The real factory.
private  boolean factoryLoaded
           
 
Constructor Summary
(package private) AdapterFactoryProxy()
           
 
Method Summary
static AdapterFactoryProxy createProxy(org.eclipse.core.runtime.IConfigurationElement element)
          Creates a new factory proxy based on the given configuration element.
(package private)  java.lang.String getAdaptableType()
           
 java.lang.Object getAdapter(java.lang.Object adaptableObject, java.lang.Class adapterType)
          Returns an object which is an instance of the given class associated with the given object.
 java.lang.Class[] getAdapterList()
          Returns the collection of adapter types handled by this factory.
(package private)  java.lang.String[] getAdapterNames()
           
(package private)  org.eclipse.core.runtime.IExtension getExtension()
           
(package private)  org.eclipse.core.runtime.IAdapterFactory loadFactory(boolean force)
          Loads the real adapter factory, but only if its associated plug-in is already loaded.
private  void logError()
          The factory extension was malformed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

element

private org.eclipse.core.runtime.IConfigurationElement element

factory

private org.eclipse.core.runtime.IAdapterFactory factory
The real factory. Null until the factory is loaded.


factoryLoaded

private boolean factoryLoaded
Constructor Detail

AdapterFactoryProxy

AdapterFactoryProxy()
Method Detail

createProxy

public static AdapterFactoryProxy createProxy(org.eclipse.core.runtime.IConfigurationElement element)
Creates a new factory proxy based on the given configuration element. Returns the new proxy, or null if the element could not be created.


getAdaptableType

java.lang.String getAdaptableType()

getAdapter

public java.lang.Object getAdapter(java.lang.Object adaptableObject,
                                   java.lang.Class adapterType)
Description copied from interface: org.eclipse.core.runtime.IAdapterFactory
Returns an object which is an instance of the given class associated with the given object. Returns null if no such object can be found.

Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdapterFactory

getAdapterList

public java.lang.Class[] getAdapterList()
Description copied from interface: org.eclipse.core.runtime.IAdapterFactory
Returns the collection of adapter types handled by this factory.

This method is generally used by an adapter manager to discover which adapter types are supported, in advance of dispatching any actual getAdapter requests.

Specified by:
getAdapterList in interface org.eclipse.core.runtime.IAdapterFactory

getAdapterNames

java.lang.String[] getAdapterNames()

getExtension

org.eclipse.core.runtime.IExtension getExtension()

loadFactory

org.eclipse.core.runtime.IAdapterFactory loadFactory(boolean force)
Loads the real adapter factory, but only if its associated plug-in is already loaded. Returns the real factory if it was successfully loaded.


logError

private void logError()
The factory extension was malformed. Log an appropriate exception