com.triangularpixels.rebirth.resources
Class Decoder
java.lang.Object
com.triangularpixels.rebirth.resources.Decoder
public class Decoder
- extends Object
Holds a single, callable, decoder (either a Method+Object pair or just a Method if the method is static)
Static decoder classes should have one (or both) of:
'public static Type decode(String attributeString)'
'public static Type decode(Element element)'
Object decoders should be an object with one (or both) of:
'public Type decode(String attributeString)'
'public Type decode(Element element)'
The decoder will be automatically called whenever a field of 'Type' needs to be decoded.
Return null if the expected input is not valid, decoding will continue with the next highest priority decoder
for this type.
- Author:
- John Campbell
object
public final Object object
method
public final Method method
extractAttributeDecoder
public static Decoder extractAttributeDecoder(Class<?> clazz)
extractAttributeDecoder
public static Decoder extractAttributeDecoder(Object target)
extractElementDecoder
public static Decoder extractElementDecoder(Class<?> clazz)
extractElementDecoder
public static Decoder extractElementDecoder(Object target)
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2009 TriangularPixels.com. All Rights Reserved.