Package daikon.chicory
Class MethodInfo
- Object
-
- MethodInfo
-
public class MethodInfo extends Object
Keeps information about a method that is useful for writing out decl and/or dtrace information. Original information is filled out during the transformation and other information is added the first time a method is called.
-
-
Field Summary
Fields Modifier and Type Field Description String[]
arg_names
Array of argument names for this method.@ClassGetName String[]
arg_type_strings
Array of argument types for this method (fully qualified).Class<?>[]
arg_types
Array of argument types as classes for this method.int
call_cnt
The number of times this method has been called.int
capture_cnt
The number of times we have captured the output for this method.ClassInfo
class_info
Class that contains this method.List<Integer>
exit_locations
exit locations for this methodList<Boolean>
is_included
Tells whether each exit point in method is instrumented, based on filters.@MonotonicNonNull Member
member
Reflection information on this method.String
method_name
Method name.@MonotonicNonNull RootInfo
traversalEnter
The root of the variable tree for the method entry program point.@MonotonicNonNull RootInfo
traversalExit
The root of the variable tree for the method exit program point(s).
-
Constructor Summary
Constructors Constructor Description MethodInfo(ClassInfo class_info, String method_name, String[] arg_names, @ClassGetName String[] arg_type_strings, List<Integer> exit_locations, List<Boolean> is_included)
Creates a MethodInfo with the specified class, arg_names, and exit locations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init_traversal(int depth)
Initialize the enter and exit daikon variable trees (traversalEnter and traversalExit).void
initViaReflection()
Populates this class with data from reflection.boolean
is_class_initializer()
Returns true iff this method is a class initializer.boolean
is_constructor()
Returns true iff this method is a constructor.boolean
is_static()
Returns true iff this method is static.boolean
isPure()
Class<?>
return_type()
Returns the turn type of the method, or Void.TYPE for a constructor.String
toString()
-
-
-
Field Detail
-
class_info
public ClassInfo class_info
Class that contains this method.
-
member
public @MonotonicNonNull Member member
Reflection information on this method. Null if a class initializer,<clinit>
(seeis_class_initializer()
.
-
method_name
public String method_name
Method name. For example: "public static void sort(int[] arr)" would have method_name "sort".
-
arg_type_strings
public @ClassGetName String[] arg_type_strings
Array of argument types for this method (fully qualified). For example: "public static void examineObject(Object x)" would have arg_types {"java.lang.Object"}.
-
exit_locations
public List<Integer> exit_locations
exit locations for this method
-
is_included
public List<Boolean> is_included
Tells whether each exit point in method is instrumented, based on filters.
-
traversalEnter
public @MonotonicNonNull RootInfo traversalEnter
The root of the variable tree for the method entry program point.Set by Runtime and read by DeclWriter and DTraceWriter.
-
traversalExit
public @MonotonicNonNull RootInfo traversalExit
The root of the variable tree for the method exit program point(s).Set by Runtime and read by DeclWriter and DTraceWriter.
-
call_cnt
public int call_cnt
The number of times this method has been called.
-
capture_cnt
public int capture_cnt
The number of times we have captured the output for this method.
-
-
Method Detail
-
initViaReflection
public void initViaReflection()
Populates this class with data from reflection.
-
is_constructor
@Pure public boolean is_constructor()
Returns true iff this method is a constructor.- Returns:
- true iff this method is a constructor
-
is_class_initializer
@Pure public boolean is_class_initializer()
Returns true iff this method is a class initializer.- Returns:
- true iff this method is a class initializer
-
is_static
@RequiresNonNull("member") @Pure public boolean is_static()
Returns true iff this method is static.- Returns:
- true iff this method is static
-
init_traversal
public void init_traversal(int depth)
Initialize the enter and exit daikon variable trees (traversalEnter and traversalExit). The reflection information must have already been initialized.
-
isPure
public boolean isPure()
-
return_type
public Class<?> return_type()
Returns the turn type of the method, or Void.TYPE for a constructor.
-
-