|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.fractal.aokell.glue.SpoonHelper
public class SpoonHelper
Helper class for working with Spoon.
Constructor Summary | |
---|---|
SpoonHelper()
|
Method Summary | |
---|---|
static boolean |
deepImpls(spoon.reflect.declaration.CtClass<?> ct,
Class<?> itf)
Return true if one of the subclasses of the given CtClass implements the given interface. |
static Class<?>[] |
getClassParameterTypes(List<spoon.reflect.declaration.CtParameter<?>> params)
Return the classes of the given list of parameters. |
static spoon.reflect.reference.CtTypeReference<?>[] |
getTypeRefParameterTypes(List<spoon.reflect.declaration.CtParameter<?>> params)
Return the type references of the given list of parameters. |
static boolean |
impls(spoon.reflect.declaration.CtClass ct,
Class<?> itf)
Return true if the given CtClass implements directly the given interface. |
static void |
insert(spoon.reflect.declaration.CtClass<?> ct,
Class<?> typeToMatch,
spoon.template.Template template)
Insert a template in a CtClass if the CtClass implements the given type and if none of the super classes of the CtClass already implements the given type (to avoid duplicate insertion of the template). |
static void |
insert(spoon.reflect.declaration.CtClass<?> ct,
spoon.template.Template template)
Insert a template in a CtClass. |
static boolean |
isInterfaceMethodImplementation(spoon.reflect.declaration.CtClass<?> cl,
spoon.reflect.declaration.CtMethod<?> meth)
If the given method implements a method declared in an interface of the given class, return true. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpoonHelper()
Method Detail |
---|
public static boolean isInterfaceMethodImplementation(spoon.reflect.declaration.CtClass<?> cl, spoon.reflect.declaration.CtMethod<?> meth)
public static spoon.reflect.reference.CtTypeReference<?>[] getTypeRefParameterTypes(List<spoon.reflect.declaration.CtParameter<?>> params)
public static Class<?>[] getClassParameterTypes(List<spoon.reflect.declaration.CtParameter<?>> params)
public static boolean deepImpls(spoon.reflect.declaration.CtClass<?> ct, Class<?> itf)
public static boolean impls(spoon.reflect.declaration.CtClass ct, Class<?> itf)
public static void insert(spoon.reflect.declaration.CtClass<?> ct, Class<?> typeToMatch, spoon.template.Template template)
ct
- the CtClass where the insertion must be performedtypeToMatch
- the type to match (a class or an interface)template
- the Spoon template containing the code to insertpublic static void insert(spoon.reflect.declaration.CtClass<?> ct, spoon.template.Template template)
ct
- the CtClass where the insertion must be performedtemplate
- the Spoon template containing the code to insert
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |