org.acm.seguin.summary
Class VariableSummary

java.lang.Object
  extended by org.acm.seguin.summary.Summary
      extended by org.acm.seguin.summary.VariableSummary
All Implemented Interfaces:
java.io.Serializable, net.sourceforge.jrefactory.ast.ModifierHolder
Direct Known Subclasses:
FieldSummary, LocalVariableSummary, ParameterSummary

public class VariableSummary
extends Summary

Stores information about a method

Author:
Chris Seguin
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.acm.seguin.summary.Summary
modifiers
 
Fields inherited from interface net.sourceforge.jrefactory.ast.ModifierHolder
ABSTRACT, EXPLICIT, FINAL, INTERFACE, names, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICTFP, SYNCHRONIZED, TRANSIENT, VOLATILE
 
Constructor Summary
VariableSummary(Summary parentSummary, net.sourceforge.jrefactory.ast.ASTType typeNode, net.sourceforge.jrefactory.ast.ASTVariableDeclaratorId id)
          Construct a method from a method declaration node
VariableSummary(Summary parentSummary, TypeDeclSummary type, java.lang.String name)
          Create a variable for debugging purposes
 
Method Summary
 java.lang.Object accept(SummaryVisitor visitor, java.lang.Object data)
          Provide method to visit a node
 java.lang.String getDeclaration()
          Convert this to a string
 java.lang.String getName()
          Return the name
 java.lang.String getType()
          Return the type as a string
 TypeDeclSummary getTypeDecl()
          Return the type as a type summary
 void setName(java.lang.String value)
          Sets the name
 java.lang.String toString()
          Convert this to a string
 
Methods inherited from class org.acm.seguin.summary.Summary
addModifier, copyModifiers, getDeclarationLine, getEndLine, getModifiers, getModifiersString, getParent, getStartLine, isAbstract, isExplicit, isFinal, isInterface, isNative, isPackage, isPrivate, isProtected, isPublic, isStatic, isStrictFP, isSynchronized, isTransient, isVolatile, setAbstract, setAbstract, setCode, setEndLine, setFinal, setModifiers, setPrivate, setPrivate, setProtected, setProtected, setPublic, setPublic, setStartLine, setStatic, setStatic, setStrict, setSynchronized, setSynchronized, toStandardOrderString, toStringAlphabetical
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariableSummary

public VariableSummary(Summary parentSummary,
                       net.sourceforge.jrefactory.ast.ASTType typeNode,
                       net.sourceforge.jrefactory.ast.ASTVariableDeclaratorId id)
Construct a method from a method declaration node

Parameters:
parentSummary - the parent summary
id - The id of the variable
typeNode - Description of Parameter

VariableSummary

public VariableSummary(Summary parentSummary,
                       TypeDeclSummary type,
                       java.lang.String name)
Create a variable for debugging purposes

Parameters:
parentSummary - Description of Parameter
type - Description of Parameter
name - Description of Parameter
Method Detail

setName

public void setName(java.lang.String value)
Sets the name

Parameters:
value - the name of the field

getName

public java.lang.String getName()
Return the name

Specified by:
getName in class Summary
Returns:
the name of the method

getType

public java.lang.String getType()
Return the type as a string

Returns:
the name of the method

getTypeDecl

public TypeDeclSummary getTypeDecl()
Return the type as a type summary

Returns:
the type summary

getDeclaration

public java.lang.String getDeclaration()
Convert this to a string

Returns:
a string representation of this object

toString

public java.lang.String toString()
Convert this to a string

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this object

accept

public java.lang.Object accept(SummaryVisitor visitor,
                               java.lang.Object data)
Provide method to visit a node

Overrides:
accept in class Summary
Parameters:
visitor - the visitor
data - the data for the visit
Returns:
some new data