abc.weaving.aspectinfo
Class MethodCategory

java.lang.Object
  extended by abc.weaving.aspectinfo.MethodCategory

public class MethodCategory
extends java.lang.Object

Decide what a field or method in jimple really is

Author:
Aske Simon Christensen, Oege de Moor

Field Summary
static int ACCESSOR_GET
          An accessor method to get the value of a field.
static int ACCESSOR_SET
          An accessor method to set the value of a field.
static int ADVICE_BODY
          An advice body
static int ASPECT_INSTANCE
          A special aspect method, i.e.
static int IF_EXPR
          The expression in an if pointcut
static int INTERTYPE_CONSTRUCTOR_BODY
          The body of an intertype constructor declaration, without field initializers.
static int INTERTYPE_CONSTRUCTOR_DELEGATOR
          A woven intertype constructor declaration, delegating to the actual implementation
static int INTERTYPE_CONSTRUCTOR_SPECIAL_ARG
          The encapsulation of an argument to a this or super call in an intertype constructor declaration
static int INTERTYPE_FIELD_INITIALIZER
          The initializer for an intertype field declaration
static int INTERTYPE_INITIALIZER_DELEGATE
          The delegate for an initializer for an intertype field declaration
static int INTERTYPE_METHOD_DELEGATOR
          A woven intertype method declaration, delegating to the actual implementation.
static int INTERTYPE_METHOD_SOURCE
          The implementation placeholder of an intertype method declaration.
static int INTERTYPE_SPECIAL_CALL_DELEGATOR
          A method delegating a this or super call from an intertype method or constructor
static int NORMAL
          A normal method
static int PROCEED
          A proceed dummy method
static int THIS_GET
          An accessor method to get the value of a qualified use of "this" or "super" inside an intertype method.
 
Constructor Summary
MethodCategory()
           
 
Method Summary
static boolean adviceBody(int cat)
           
static boolean adviceBody(MethodSig m)
           
static int getCategory(SootMethod m)
           
static SootClass getClass(SootMethod m)
           
static SootField getField(SootMethod sm)
           
static SootFieldRef getFieldRef(SootMethodRef smr)
           
static int getModifiers(SootMethod m)
           
static java.lang.String getName(SootMethod m)
           
static int getSkipFirst(SootMethod m)
           
static int getSkipLast(SootMethod m)
           
static boolean hasThisAsFirstParameter(SootMethod m)
          is this an ITD (method or field initialiser) that has "this" as a parameter?
static void register(MethodDecl m, ClassType container, int cat)
           
static void register(MethodSig sig, int cat)
           
static void registerFieldGet(FieldSig fs, MethodSig sig)
           
static void registerFieldSet(FieldSig fs, MethodSig sig)
           
static void registerRealNameAndClass(FieldSig sig, int mods, java.lang.String real_name, AbcClass real_class)
           
static void registerRealNameAndClass(MethodDecl m, ClassType container, Flags mods, java.lang.String real_name, AbcClass real_class, int skip_first, int skip_last)
           
static void registerRealNameAndClass(MethodSig sig, int mods, java.lang.String real_name, AbcClass real_class, int skip_first, int skip_last)
           
static boolean weaveCalls(int cat)
           
static boolean weaveCalls(MethodSig m)
           
static boolean weaveExecution(int cat)
           
static boolean weaveExecution(MethodSig m)
           
static boolean weaveInside(int cat)
           
static boolean weaveInside(MethodSig m)
           
static boolean weaveSetGet(SootField sfs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORMAL

public static final int NORMAL
A normal method

See Also:
Constant Field Values

ASPECT_INSTANCE

public static final int ASPECT_INSTANCE
A special aspect method, i.e. aspectOf...

See Also:
Constant Field Values

ADVICE_BODY

public static final int ADVICE_BODY
An advice body

See Also:
Constant Field Values

PROCEED

public static final int PROCEED
A proceed dummy method

See Also:
Constant Field Values

IF_EXPR

public static final int IF_EXPR
The expression in an if pointcut

See Also:
Constant Field Values

INTERTYPE_METHOD_SOURCE

public static final int INTERTYPE_METHOD_SOURCE
The implementation placeholder of an intertype method declaration. This will have its name as real name and the host class as real class.

See Also:
Constant Field Values

INTERTYPE_METHOD_DELEGATOR

public static final int INTERTYPE_METHOD_DELEGATOR
A woven intertype method declaration, delegating to the actual implementation. This will have its name as real name and the host class as real class.

See Also:
Constant Field Values

INTERTYPE_CONSTRUCTOR_BODY

public static final int INTERTYPE_CONSTRUCTOR_BODY
The body of an intertype constructor declaration, without field initializers. This will have real name <init> and the host class as real class.

See Also:
Constant Field Values

INTERTYPE_CONSTRUCTOR_SPECIAL_ARG

public static final int INTERTYPE_CONSTRUCTOR_SPECIAL_ARG
The encapsulation of an argument to a this or super call in an intertype constructor declaration

See Also:
Constant Field Values

INTERTYPE_CONSTRUCTOR_DELEGATOR

public static final int INTERTYPE_CONSTRUCTOR_DELEGATOR
A woven intertype constructor declaration, delegating to the actual implementation

See Also:
Constant Field Values

INTERTYPE_FIELD_INITIALIZER

public static final int INTERTYPE_FIELD_INITIALIZER
The initializer for an intertype field declaration

See Also:
Constant Field Values

INTERTYPE_INITIALIZER_DELEGATE

public static final int INTERTYPE_INITIALIZER_DELEGATE
The delegate for an initializer for an intertype field declaration

See Also:
Constant Field Values

INTERTYPE_SPECIAL_CALL_DELEGATOR

public static final int INTERTYPE_SPECIAL_CALL_DELEGATOR
A method delegating a this or super call from an intertype method or constructor

See Also:
Constant Field Values

ACCESSOR_GET

public static final int ACCESSOR_GET
An accessor method to get the value of a field. This will have the name and class of the field as real name class.

See Also:
Constant Field Values

ACCESSOR_SET

public static final int ACCESSOR_SET
An accessor method to set the value of a field. This will have the name and class of the field as real name class.

See Also:
Constant Field Values

THIS_GET

public static final int THIS_GET
An accessor method to get the value of a qualified use of "this" or "super" inside an intertype method.

See Also:
Constant Field Values
Constructor Detail

MethodCategory

public MethodCategory()
Method Detail

weaveInside

public static boolean weaveInside(int cat)

weaveInside

public static boolean weaveInside(MethodSig m)

weaveExecution

public static boolean weaveExecution(int cat)

weaveExecution

public static boolean weaveExecution(MethodSig m)

weaveCalls

public static boolean weaveCalls(int cat)

weaveCalls

public static boolean weaveCalls(MethodSig m)

adviceBody

public static boolean adviceBody(int cat)

adviceBody

public static boolean adviceBody(MethodSig m)

getCategory

public static int getCategory(SootMethod m)

register

public static void register(MethodSig sig,
                            int cat)

register

public static void register(MethodDecl m,
                            ClassType container,
                            int cat)

registerRealNameAndClass

public static void registerRealNameAndClass(MethodSig sig,
                                            int mods,
                                            java.lang.String real_name,
                                            AbcClass real_class,
                                            int skip_first,
                                            int skip_last)

registerRealNameAndClass

public static void registerRealNameAndClass(MethodDecl m,
                                            ClassType container,
                                            Flags mods,
                                            java.lang.String real_name,
                                            AbcClass real_class,
                                            int skip_first,
                                            int skip_last)

registerRealNameAndClass

public static void registerRealNameAndClass(FieldSig sig,
                                            int mods,
                                            java.lang.String real_name,
                                            AbcClass real_class)

getModifiers

public static int getModifiers(SootMethod m)

getName

public static java.lang.String getName(SootMethod m)

getClass

public static SootClass getClass(SootMethod m)

getSkipFirst

public static int getSkipFirst(SootMethod m)

getSkipLast

public static int getSkipLast(SootMethod m)

getField

public static SootField getField(SootMethod sm)

getFieldRef

public static SootFieldRef getFieldRef(SootMethodRef smr)

registerFieldGet

public static void registerFieldGet(FieldSig fs,
                                    MethodSig sig)

registerFieldSet

public static void registerFieldSet(FieldSig fs,
                                    MethodSig sig)

weaveSetGet

public static boolean weaveSetGet(SootField sfs)

hasThisAsFirstParameter

public static boolean hasThisAsFirstParameter(SootMethod m)
is this an ITD (method or field initialiser) that has "this" as a parameter?