Package com.sdicons.json.helper
Class HelperRepository<T extends Helper>
- java.lang.Object
-
- com.sdicons.json.helper.HelperRepository<T>
-
public class HelperRepository<T extends Helper> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classHelperRepository.HelperTreeNode<T extends Helper>private static classHelperRepository.RootHelper
-
Field Summary
Fields Modifier and Type Field Description private HelperRepository.HelperTreeNode<T>root
-
Constructor Summary
Constructors Constructor Description HelperRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHelper(T aHelper)Add a helper to the repository.TfindHelper(java.lang.Class aClass)Lookup a helper in the repository.java.lang.StringprettyPrint()
-
-
-
Field Detail
-
root
private HelperRepository.HelperTreeNode<T extends Helper> root
-
-
Method Detail
-
addHelper
public void addHelper(T aHelper)
Add a helper to the repository.- Parameters:
aHelper- The helper to add.
-
findHelper
public T findHelper(java.lang.Class aClass)
Lookup a helper in the repository.- Parameters:
aClass- The class for which a helper is wanted.- Returns:
- The corresponding helper. There is always a general fallback helper which uses introspection to serialize the properties of a JavaBean. This property helper is always returned as a last possibility. So this method always returns a helper.
-
prettyPrint
public java.lang.String prettyPrint()
-
-