org.nakedobjects.metamodel.specloader.classsubstitutor
Class ClassSubstitutorAbstract

java.lang.Object
  extended by org.nakedobjects.metamodel.specloader.classsubstitutor.ClassSubstitutorAbstract
All Implemented Interfaces:
ApplicationScopedComponent, Component, Injectable, ClassSubstitutor
Direct Known Subclasses:
ClassSubstitutorIdentity

public abstract class ClassSubstitutorAbstract
extends java.lang.Object
implements ClassSubstitutor


Constructor Summary
ClassSubstitutorAbstract()
          Will implicitly ignore the DomainObjectContainer.
 
Method Summary
 java.lang.Class<?> getClass(java.lang.Class<?> cls)
          Hook method for subclasses to override if required.
 java.util.Set<java.lang.Class<?>> getIgnoredClasses()
           
protected  boolean ignore(java.lang.Class<?> q)
          For any classes registered as ignored, getClass(Class) will return null.
 void init()
          Default implementation does nothing.
 void injectInto(java.lang.Object candidate)
          Will inject itself into the candidate if the candidate implements the corresponding *Aware type.
 void shutdown()
          Default implementation does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassSubstitutorAbstract

public ClassSubstitutorAbstract()
Will implicitly ignore the DomainObjectContainer.

Method Detail

init

public void init()
Default implementation does nothing.

Specified by:
init in interface ApplicationScopedComponent

shutdown

public void shutdown()
Default implementation does nothing.

Specified by:
shutdown in interface ApplicationScopedComponent

getClass

public java.lang.Class<?> getClass(java.lang.Class<?> cls)
Hook method for subclasses to override if required.

Default implementation will either return the class, unless has been registered as to be ignored, in which case returns null.

Specified by:
getClass in interface ClassSubstitutor

ignore

protected boolean ignore(java.lang.Class<?> q)
For any classes registered as ignored, getClass(Class) will return null.


getIgnoredClasses

public java.util.Set<java.lang.Class<?>> getIgnoredClasses()

injectInto

public void injectInto(java.lang.Object candidate)
Description copied from interface: Injectable
Will inject itself into the candidate if the candidate implements the corresponding *Aware type.

Specified by:
injectInto in interface Injectable


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