com.triangularpixels.rebirth.resources
Class Decoder

java.lang.Object
  extended by 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

Field Summary
 Method method
           
 Object object
           
 
Method Summary
static Decoder extractAttributeDecoder(Class<?> clazz)
           
static Decoder extractAttributeDecoder(Object target)
           
static Decoder extractElementDecoder(Class<?> clazz)
           
static Decoder extractElementDecoder(Object target)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

object

public final Object object

method

public final Method method
Method Detail

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.