|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.javalanglevels.Data
edu.rice.cs.javalanglevels.BodyData
edu.rice.cs.javalanglevels.MethodData
public class MethodData
Represents the data for a given method.
| Nested Class Summary | |
|---|---|
static class |
MethodData.MethodDataTest
Tests the methods declared above |
| Nested classes/interfaces inherited from class edu.rice.cs.javalanglevels.BodyData |
|---|
BodyData.BodyDataTest |
| Nested classes/interfaces inherited from class edu.rice.cs.javalanglevels.Data |
|---|
Data.DataTest |
| Field Summary |
|---|
| Fields inherited from class edu.rice.cs.javalanglevels.Data |
|---|
_blockIterator, _blocks, _enclosingData, _innerClasses, _modifiersAndVisibility, _name, _outerData, _vars |
| Constructor Summary | |
|---|---|
MethodData(String name,
ModifiersAndVisibility modifiersAndVisibility,
TypeParameter[] typeParameters,
SymbolData returnType,
VariableData[] params,
String[] thrown,
SymbolData enclosingClass,
JExpression jexpr)
Constructor for MethodData. |
|
MethodData(String name,
VariableData[] params)
Constructor used by the LanguageLevelConverter, where only the name and params matter |
|
| Method Summary | |
|---|---|
void |
addPublicMav()
Makes this method public. |
boolean |
equals(Object obj)
Two MethodDatas are equal if ... |
JExpression |
getJExpression()
|
ModifiersAndVisibility |
getMav()
|
MethodData |
getMethodData()
Will return this, if it is a method data, or the enclosing method data if this is a block data. |
VariableData[] |
getParams()
|
SymbolData |
getReturnType()
|
String[] |
getThrown()
|
TypeParameter[] |
getTypeParameters()
|
int |
hashCode()
Define a hashCode() method that hashes on the method name and its enclosing data. |
boolean |
isGenerated()
|
boolean |
isMethodData()
True if this is a method data. |
boolean |
isStatic()
Returns true if this MethodData is static. |
static MethodData |
make(String name,
ModifiersAndVisibility modifiersAndVisibility,
TypeParameter[] typeParameters,
SymbolData returnType,
VariableData[] params,
String[] thrown,
SymbolData enclosingClass,
JExpression jexpr)
Factory methods used for debugging purposes among other things. |
static MethodData |
make(String name,
VariableData[] params)
|
void |
setGenerated(boolean generated)
|
void |
setParams(VariableData[] p)
Set the method params to be p |
void |
setReturnType(SymbolData rt)
set the return type to be rt |
void |
setThrown(String[] thrown)
Sets thrown to be thrown |
String |
toBigString()
|
String |
toString()
|
| Methods inherited from class edu.rice.cs.javalanglevels.BodyData |
|---|
getSymbolData |
| Methods inherited from class edu.rice.cs.javalanglevels.Data |
|---|
addBlock, addEnclosingData, addFinalVars, addInnerClass, addModifier, addVar, addVars, createUniqueName, dollarSignsToDots, dotsToDollarSigns, getEnclosingClass, getEnclosingData, getInnerClasses, getInnerClassOrInterface, getInnerClassOrInterfaceHelper, getName, getNextAnonymousInnerClass, getNextBlock, getOuterData, getVar, getVars, hasModifier, innerClassesAndInterfacesIterator, isAnonymousClass, isDoublyAnonymous, isOuterData, removeAllBlocks, resetBlockIterator, setEnclosingData, setInnerClasses, setMav, setOuterData |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MethodData(String name,
ModifiersAndVisibility modifiersAndVisibility,
TypeParameter[] typeParameters,
SymbolData returnType,
VariableData[] params,
String[] thrown,
SymbolData enclosingClass,
JExpression jexpr)
name - The String name of the methodmodifiersAndVisibility - The modifiers of the methodtypeParameters - The generic type parameters of the method. Not used.returnType - The SymbolData corresponding to the return type of the methodparams - The VariableData[] corresponding to the method parametersthrown - The Strings corresponding to the exceptions the method is declared to throwenclosingClass - The SymbolData that contains this methodjexpr - The JExpression corresponding to this method.
public MethodData(String name,
VariableData[] params)
| Method Detail |
|---|
public static MethodData make(String name,
ModifiersAndVisibility modifiersAndVisibility,
TypeParameter[] typeParameters,
SymbolData returnType,
VariableData[] params,
String[] thrown,
SymbolData enclosingClass,
JExpression jexpr)
public static MethodData make(String name,
VariableData[] params)
public boolean isGenerated()
public boolean isStatic()
public void setGenerated(boolean generated)
generated - true or false--whether to set this method to generated or notpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean isMethodData()
BodyData
isMethodData in class BodyDatapublic MethodData getMethodData()
BodyData
getMethodData in class BodyDatapublic TypeParameter[] getTypeParameters()
public SymbolData getReturnType()
public void setReturnType(SymbolData rt)
public VariableData[] getParams()
public void setParams(VariableData[] p)
public String[] getThrown()
public void setThrown(String[] thrown)
public ModifiersAndVisibility getMav()
getMav in class Datapublic void addPublicMav()
public JExpression getJExpression()
public String toString()
toString in class Objectpublic String toBigString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||