org.acm.seguin.summary.query
Class MethodQuery

java.lang.Object
  extended by org.acm.seguin.summary.query.MethodQuery

public class MethodQuery
extends java.lang.Object

Finds a method associated with a particular type summary. A permission is also specified to insure that we find something interesting.

Author:
Chris Seguin

Field Summary
static int DEFAULT
          The method we are looking for must have default protection level or higher
static int PRIVATE
          The method we are looking for can have any protection level
static int PROTECTED
          The method we are looking for must have protected protection level or higher
static int PUBLIC
          The method we are looking for must be public
 
Constructor Summary
MethodQuery()
           
 
Method Summary
static MethodSummary find(TypeSummary typeSummary, java.lang.String name)
          Finds an associated method
static MethodSummary query(TypeSummary typeSummary, java.lang.String name, int protection)
          Finds the method associated with a type
static MethodSummary queryAncestors(TypeSummary typeSummary, java.lang.String name, int protection)
          Finds the method associated with a type in the ancestors of that type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRIVATE

public static final int PRIVATE
The method we are looking for can have any protection level

See Also:
Constant Field Values

DEFAULT

public static final int DEFAULT
The method we are looking for must have default protection level or higher

See Also:
Constant Field Values

PROTECTED

public static final int PROTECTED
The method we are looking for must have protected protection level or higher

See Also:
Constant Field Values

PUBLIC

public static final int PUBLIC
The method we are looking for must be public

See Also:
Constant Field Values
Constructor Detail

MethodQuery

public MethodQuery()
Method Detail

find

public static MethodSummary find(TypeSummary typeSummary,
                                 java.lang.String name)
Finds an associated method

Parameters:
typeSummary - the type
name - the name
Returns:
the method found or null if none

query

public static MethodSummary query(TypeSummary typeSummary,
                                  java.lang.String name,
                                  int protection)
Finds the method associated with a type

Parameters:
typeSummary - the type to search
name - the name of the method
protection - the minimum protection level
Returns:
the method summary if one is found, null if none is found

queryAncestors

public static MethodSummary queryAncestors(TypeSummary typeSummary,
                                           java.lang.String name,
                                           int protection)
Finds the method associated with a type in the ancestors of that type

Parameters:
typeSummary - the type to search
name - the name of the method
protection - the minimum protection level
Returns:
the method summary if one is found, null if none is found