org.nakedobjects.runtime.system.installers
Class JavaReflectorInstaller

java.lang.Object
  extended by org.nakedobjects.runtime.installers.InstallerAbstract
      extended by org.nakedobjects.runtime.system.installers.JavaReflectorInstaller
All Implemented Interfaces:
ApplicationScopedComponent, Component, Installer, ConfigurationBuilderAware, NakedObjectReflectorInstaller, InstallerLookupAware

public class JavaReflectorInstaller
extends InstallerAbstract
implements NakedObjectReflectorInstaller, InstallerLookupAware


Field Summary
static java.lang.String PROPERTY_BASE
           
 
Fields inherited from interface org.nakedobjects.metamodel.specloader.NakedObjectReflectorInstaller
TYPE
 
Constructor Summary
JavaReflectorInstaller()
           
JavaReflectorInstaller(java.lang.String name)
           
 
Method Summary
 void addFacetDecoratorInstaller(FacetDecoratorInstaller decoratorInstaller)
          Adds in FacetDecoratorInstaller; if null or if already added then request will be silently ignored.
protected  ClassSubstitutor createClassSubstitutor(NakedObjectConfiguration configuration)
          Hook method to allow subclasses to specify a different implementation of ClassSubstitutor.
protected  CollectionTypeRegistry createCollectionTypeRegistry(NakedObjectConfiguration configuration)
          Creates the CollectionTypeRegistry, hardcoded to be the CollectionTypeRegistryDefault.
protected  java.util.Set<FacetDecorator> createFacetDecorators(NakedObjectConfiguration configuration)
          Hook method to allow subclasses to specify a different sets of FacetDecorators.
protected  MetaModelValidator createMetaModelValidator(NakedObjectConfiguration configuration)
          Hook method to allow subclasses to specify a different implementation of MetaModelValidator.
protected  ProgrammingModelFacets createProgrammingModelFacets(NakedObjectConfiguration configuration)
          Hook method to allow subclasses to specify a different implementations (that is, sets of ProgrammingModelFacets.
 JavaReflector createReflector()
          Should call #addFacetDecoratorInstaller(ReflectorDecoratorInstaller) prior to calling this.
protected  SpecificationTraverser createSpecificationTraverser(NakedObjectConfiguration configuration)
          Hook method to allow subclasses to specify a different implementation of SpecificationTraverser.
protected  JavaReflector doCreateReflector(NakedObjectConfiguration configuration, ClassSubstitutor classSubstitutor, CollectionTypeRegistry collectionTypeRegistry, SpecificationTraverser specificationTraverser, ProgrammingModelFacets programmingModelFacets, java.util.Set<FacetDecorator> facetDecorators, MetaModelValidator metaModelValidator)
          Hook method to allow for other implementations (still based on JavaReflector).
protected  void excludeFacetFactories(NakedObjectConfiguration configuration, ProgrammingModelFacets programmingModelFacets)
          Factored out of createProgrammingModelFacets(NakedObjectConfiguration) so that subclasses that choose to override can still support customization of their ProgrammingModelFacets in a similar way.
protected  void includeFacetFactories(NakedObjectConfiguration configuration, ProgrammingModelFacets programmingModelFacets)
          Factored out of createProgrammingModelFacets(NakedObjectConfiguration) so that subclasses that choose to override can still support customization of their ProgrammingModelFacets in a similar way.
 void setInstallerLookup(InstallerLookup installerLookup)
          Injected by virtue of being InstallerLookupAware.
 
Methods inherited from class org.nakedobjects.runtime.installers.InstallerAbstract
addConfigurationResources, getConfiguration, getConfigurationResources, getName, getType, init, setConfiguration, setConfigurationBuilder, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nakedobjects.metamodel.commons.component.Installer
getConfigurationResources, getName, getType
 
Methods inherited from interface org.nakedobjects.metamodel.commons.component.ApplicationScopedComponent
init, shutdown
 

Field Detail

PROPERTY_BASE

public static final java.lang.String PROPERTY_BASE
See Also:
Constant Field Values
Constructor Detail

JavaReflectorInstaller

public JavaReflectorInstaller()

JavaReflectorInstaller

public JavaReflectorInstaller(java.lang.String name)
Method Detail

createReflector

public JavaReflector createReflector()
Should call #addFacetDecoratorInstaller(ReflectorDecoratorInstaller) prior to calling this.

Specified by:
createReflector in interface NakedObjectReflectorInstaller

createClassSubstitutor

protected ClassSubstitutor createClassSubstitutor(NakedObjectConfiguration configuration)
Hook method to allow subclasses to specify a different implementation of ClassSubstitutor.

By default, looks up implementation from provided NakedObjectConfiguration using ReflectorConstants.CLASS_SUBSTITUTOR_CLASS_NAME. If not specified, then defaults to .


createSpecificationTraverser

protected SpecificationTraverser createSpecificationTraverser(NakedObjectConfiguration configuration)
Hook method to allow subclasses to specify a different implementation of SpecificationTraverser.

By default, looks up implementation from provided NakedObjectConfiguration using ReflectorConstants.SPECIFICATION_TRAVERSER_CLASS_NAME. If not specified, then defaults to .


createProgrammingModelFacets

protected ProgrammingModelFacets createProgrammingModelFacets(NakedObjectConfiguration configuration)
Hook method to allow subclasses to specify a different implementations (that is, sets of ProgrammingModelFacets.

By default, looks up implementation from provided NakedObjectConfiguration using ReflectorConstants.PROGRAMMING_MODEL_FACETS_CLASS_NAME. If not specified, then defaults to .

The list of facets can be adjusted using ReflectorConstants.FACET_FACTORY_INCLUDE_CLASS_NAME_LIST to specify additional factories to include, and ReflectorConstants.FACET_FACTORY_EXCLUDE_CLASS_NAME_LIST to exclude.


includeFacetFactories

protected void includeFacetFactories(NakedObjectConfiguration configuration,
                                     ProgrammingModelFacets programmingModelFacets)
Factored out of createProgrammingModelFacets(NakedObjectConfiguration) so that subclasses that choose to override can still support customization of their ProgrammingModelFacets in a similar way.


excludeFacetFactories

protected void excludeFacetFactories(NakedObjectConfiguration configuration,
                                     ProgrammingModelFacets programmingModelFacets)
Factored out of createProgrammingModelFacets(NakedObjectConfiguration) so that subclasses that choose to override can still support customization of their ProgrammingModelFacets in a similar way.


createFacetDecorators

protected java.util.Set<FacetDecorator> createFacetDecorators(NakedObjectConfiguration configuration)
Hook method to allow subclasses to specify a different sets of FacetDecorators.

By default, returns the FacetDecorators that are specified in the NakedObjectConfiguration (using ReflectorConstants.FACET_DECORATOR_CLASS_NAMES) along with any FacetDecorators explicitly registered using addFacetDecoratorInstaller(FacetDecoratorInstaller). created using the FacetDecoratorInstallers.


createMetaModelValidator

protected MetaModelValidator createMetaModelValidator(NakedObjectConfiguration configuration)
Hook method to allow subclasses to specify a different implementation of MetaModelValidator.

By default, looks up implementation from provided NakedObjectConfiguration using ReflectorConstants.META_MODEL_VALIDATOR_CLASS_NAME. If not specified, then defaults to .


createCollectionTypeRegistry

protected final CollectionTypeRegistry createCollectionTypeRegistry(NakedObjectConfiguration configuration)
Creates the CollectionTypeRegistry, hardcoded to be the CollectionTypeRegistryDefault.

Note: the intention is to remove this interface and instead to use a mechanism similar to the @Value annotation to specify which types represent collections. For now, have factored out this method similar to be similar to the creation methods of other subcomponents such as the ClassSubstitutor. Note however that this method is final so that it cannot be overridden.


doCreateReflector

protected JavaReflector doCreateReflector(NakedObjectConfiguration configuration,
                                          ClassSubstitutor classSubstitutor,
                                          CollectionTypeRegistry collectionTypeRegistry,
                                          SpecificationTraverser specificationTraverser,
                                          ProgrammingModelFacets programmingModelFacets,
                                          java.util.Set<FacetDecorator> facetDecorators,
                                          MetaModelValidator metaModelValidator)
Hook method to allow for other implementations (still based on JavaReflector).


setInstallerLookup

public void setInstallerLookup(InstallerLookup installerLookup)
Injected by virtue of being InstallerLookupAware.

Specified by:
setInstallerLookup in interface InstallerLookupAware

addFacetDecoratorInstaller

public void addFacetDecoratorInstaller(FacetDecoratorInstaller decoratorInstaller)
Adds in FacetDecoratorInstaller; if null or if already added then request will be silently ignored.

Specified by:
addFacetDecoratorInstaller in interface NakedObjectReflectorInstaller


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.