org.modeshape.repository
Interface ModeShapeConfiguration.ChooseClass<ComponentClassType,ReturnType>

Type Parameters:
ComponentClassType - the class or interface that the component is to implement
ReturnType - the interface returned from these methods
All Known Subinterfaces:
ModeShapeConfiguration.MimeTypeDetectorDefinition<ReturnType>, ModeShapeConfiguration.RepositorySourceDefinition<ReturnType>, ModeShapeConfiguration.SequencerDefinition<ReturnType>, ModeShapeConfiguration.TextExtractorDefinition<ReturnType>
All Known Implementing Classes:
ModeShapeConfiguration.ClusterBuilder, ModeShapeConfiguration.GraphComponentBuilder, ModeShapeConfiguration.MimeTypeDetectorBuilder, ModeShapeConfiguration.SequencerBuilder, ModeShapeConfiguration.SourceBuilder, ModeShapeConfiguration.TextExtractorBuilder
Enclosing class:
ModeShapeConfiguration

public static interface ModeShapeConfiguration.ChooseClass<ComponentClassType,ReturnType>

The interface used to configure the class used for a component.


Method Summary
 ReturnType usingClass(Class<? extends ComponentClassType> clazz)
          Specify the class that should be instantiated for the instance.
 ModeShapeConfiguration.LoadedFrom<ReturnType> usingClass(String classname)
          Specify the name of the class that should be instantiated for the instance.
 

Method Detail

usingClass

ModeShapeConfiguration.LoadedFrom<ReturnType> usingClass(String classname)
Specify the name of the class that should be instantiated for the instance. The classpath information will need to be defined using the returned interface.

Parameters:
classname - the name of the class that should be instantiated
Returns:
the interface used to define the classpath information; never null
Throws:
IllegalArgumentException - if the class name is null, empty, blank, or not a valid class name

usingClass

ReturnType usingClass(Class<? extends ComponentClassType> clazz)
Specify the class that should be instantiated for the instance. Because the class is already available to this class loader, there is no need to specify the classloader information.

Parameters:
clazz - the class that should be instantiated
Returns:
the next component to continue configuration; never null
Throws:
ModeShapeConfigurationException - if the class could not be accessed and instantiated (if needed)
IllegalArgumentException - if the class reference is null


Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.