|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.impl.converter.AnnotationTypeConverterLoader
public class AnnotationTypeConverterLoader
A class which will auto-discover converter objects and methods to pre-load the registry of converters on startup
| Field Summary | |
|---|---|
static String |
META_INF_SERVICES
|
| Constructor Summary | |
|---|---|
AnnotationTypeConverterLoader()
|
|
AnnotationTypeConverterLoader(ResolverUtil resolverUtil)
|
|
| Method Summary | |
|---|---|
protected String[] |
findPackageNames()
Finds the names of the packages to search for on the classpath looking for text files on the classpath at the META_INF_SERVICES location. |
protected void |
findPackages(Set<String> packages,
ClassLoader classLoader)
|
protected boolean |
isValidConverterMethod(Method method)
|
void |
load(TypeConverterRegistry registry)
A pluggable strategy to load type converters into a registry from some kind of mechanism |
protected void |
loadConverterMethods(TypeConverterRegistry registry,
Class type)
Loads all of the converter methods for the given type |
protected void |
registerTypeConverter(TypeConverterRegistry registry,
Method method,
Class toType,
Class fromType,
TypeConverter typeConverter)
|
protected void |
tokenize(Set<String> packages,
String line)
Tokenizes the line from the META-IN/services file using commas and ignoring whitespace between packages |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String META_INF_SERVICES
| Constructor Detail |
|---|
public AnnotationTypeConverterLoader()
public AnnotationTypeConverterLoader(ResolverUtil resolverUtil)
| Method Detail |
|---|
public void load(TypeConverterRegistry registry)
throws Exception
TypeConverterLoader
load in interface TypeConverterLoaderregistry - the registry to load the type converters into
Exception - if the type converters could not be loaded
protected String[] findPackageNames()
throws IOException
META_INF_SERVICES location.
IOException - is thrown for IO related errors
protected void findPackages(Set<String> packages,
ClassLoader classLoader)
throws IOException
IOException
protected void tokenize(Set<String> packages,
String line)
protected void loadConverterMethods(TypeConverterRegistry registry,
Class type)
protected void registerTypeConverter(TypeConverterRegistry registry,
Method method,
Class toType,
Class fromType,
TypeConverter typeConverter)
protected boolean isValidConverterMethod(Method method)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||