org.codegist.crest.config
Class AnnotationDrivenInterfaceConfigFactory
java.lang.Object
org.codegist.crest.config.AnnotationDrivenInterfaceConfigFactory
- All Implemented Interfaces:
- InterfaceConfigFactory
public class AnnotationDrivenInterfaceConfigFactory
- extends Object
- implements InterfaceConfigFactory
Annotation based config factory of any possible interfaces given to the factory.
The factory will lookup any annotation in package org.codegist.crest.annotate
on to the given interface.
- Each config fallback from param to method to interface until one config is found, otherwise defaults to any respective default value (InterfaceConfig
, MethodConfig
, PropertiesDrivenInterfaceConfigFactory
).
- Author:
- Laurent Gilles (laurent.gilles@codegist.org)
- See Also:
InterfaceConfig
,
org.codegist.crest.annotate
AnnotationDrivenInterfaceConfigFactory
public AnnotationDrivenInterfaceConfigFactory()
newConfig
public InterfaceConfig newConfig(Class<?> interfaze,
CRestContext context)
throws ConfigFactoryException
- Specified by:
newConfig
in interface InterfaceConfigFactory
- Parameters:
interfaze
- Interface to build the configuration fromcontext
- Current CRest context
- Returns:
- The interface config object.
- Throws:
ConfigFactoryException
- for any problem occuring during the configuration construction- See Also:
InterfaceConfigFactory
Copyright © 2011. All Rights Reserved.