org.acm.seguin.summary.query
Class GetTypeSummary

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

public class GetTypeSummary
extends java.lang.Object

Gets the type summary associated with a particular type declaration, file, or package.

Author:
Chris Seguin

Constructor Summary
GetTypeSummary()
           
 
Method Summary
static TypeSummary query(FileSummary fileSummary, java.lang.String name)
          Searches a package for a particular type.
static TypeSummary query(MethodSummary parent, java.lang.String name)
          Finds a nested type based on the name of the object
static TypeSummary query(PackageSummary packageSummary, java.lang.String name)
          Searches a package for a particular type.
static TypeSummary query(java.lang.String packageName, java.lang.String name)
          Searches a package for a particular type.
static TypeSummary query(TypeDeclSummary typeDecl)
          Get the type summary that this object refers to.
static TypeSummary query(TypeSummary parent, java.lang.String name)
          Finds a nested type based on the name of the object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetTypeSummary

public GetTypeSummary()
Method Detail

query

public static TypeSummary query(TypeDeclSummary typeDecl)
Get the type summary that this object refers to. If the type summary is not found or the type is primitive, a null is returned. If the input is null, the output is also null.

Parameters:
typeDecl - the place to start the search
Returns:
the type summary or null

query

public static TypeSummary query(FileSummary fileSummary,
                                java.lang.String name)
Searches a package for a particular type. This method returns the type, if it is found. If it is not found or the name is null, this method returns null.

Parameters:
fileSummary - the file summary
name - the name of the type summary
Returns:
the type summary if it is found and null otherwise

query

public static TypeSummary query(PackageSummary packageSummary,
                                java.lang.String name)
Searches a package for a particular type. This method returns the type, if it is found. If it is not found or the name is null, this method returns null.

Parameters:
packageSummary - the package summary
name - the name of the type summary
Returns:
the type summary if it is found and null otherwise

query

public static TypeSummary query(java.lang.String packageName,
                                java.lang.String name)
Searches a package for a particular type. This method returns the type, if it is found. If it is not found or the name is null, this method returns null.

Parameters:
packageName - the package name
name - the name of the type summary
Returns:
the type summary if it is found and null otherwise

query

public static TypeSummary query(TypeSummary parent,
                                java.lang.String name)
Finds a nested type based on the name of the object

Parameters:
parent - the parent type
name - the name of the method
Returns:
the type summary if found or null otherwise

query

public static TypeSummary query(MethodSummary parent,
                                java.lang.String name)
Finds a nested type based on the name of the object

Parameters:
parent - the parent type
name - the name of the method
Returns:
the type summary if found or null otherwise