org.iqual.chaplin
Class DynaCastResolver
java.lang.Object
org.iqual.chaplin.DynaCastResolver
public class DynaCastResolver
- extends Object
This class is associated with all dynacast handlers during the code injection phase. It decides whether the given
type can be handled by the associated dynacast handler. This class is built upon CastsTo annotation
which can be attached to the dynacast handler's class. This annotation contains a list of types to which the handler
casts any incoming value. If the class does not have that annotation it is supposed to be potentially able to convert to all type.
The FieldRedirector uses the list of instances of this class during the code injection phase when it captures
CHECKCAST instruction and wants to filter out those handlers which do not cast to the type associated with the CHECKCAST instruction. Then it
creates an array which consists of class names of all those handlers which are potentially able to cast to the type.
This array is then statically passed to DynaCastManager which dynamically resolves
in the runtime which dynacast handler will convert the value.
- Since:
- Mar 10, 2009 11:13:55 PM
- Author:
- Zbynek Slajchrt
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DynaCastResolver
public DynaCastResolver(List<org.objectweb.asm.Type> castsToTypes)
isCastable
public boolean isCastable(String type)
Copyright © 2009 iquality.org. All Rights Reserved.