org.acm.seguin.summary.query
Class FieldQuery

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

public class FieldQuery
extends java.lang.Object

Finds a field 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 field we are looking for must have default protection level or higher
static int PRIVATE
          The field we are looking for can have any protection level
static int PROTECTED
          The field we are looking for must have protected protection level or higher
static int PUBLIC
          The field we are looking for must be public
 
Constructor Summary
FieldQuery()
           
 
Method Summary
static FieldSummary find(TypeSummary typeSummary, java.lang.String name)
          Finds an associated field
static FieldSummary query(TypeSummary typeSummary, java.lang.String name, int protection)
          Finds the field associated with a type
static FieldSummary queryAncestors(TypeSummary typeSummary, java.lang.String name, int protection)
          Finds the field 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 field we are looking for can have any protection level

See Also:
Constant Field Values

DEFAULT

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

See Also:
Constant Field Values

PROTECTED

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

See Also:
Constant Field Values

PUBLIC

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

See Also:
Constant Field Values
Constructor Detail

FieldQuery

public FieldQuery()
Method Detail

find

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

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

query

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

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

queryAncestors

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

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