public String getDeclaringType(); // TODO: remove (Emacs uses it)
public String getPackageName();
- public void setReturnType(String returnType);
- public String getReturnType();
+ /**
+ * @param method return types or field types
+ */
+ public void setCorrespondingType(String returnType);
+
+ /**
+ * This correponds to both method return types and field types.
+ */
+ public String getCorrespondingType();
public String toSignatureString();
public String toString();
+ /**
+ * @return the javadoc comment for this program element, null if not available
+ */
+ public String getFormalComment();
+
/**
* Includes information about the origin of the node.
*/
protected List children = new ArrayList();
protected IMessage message = null;
protected ISourceLocation sourceLocation = null;
-
+
private List modifiers = new ArrayList();
private List relations = new ArrayList();
this.kind = kind;
}
- public void setReturnType(String returnType) {
+ public void setCorrespondingType(String returnType) {
this.returnType = returnType;
}
- public String getReturnType() {
+ public String getCorrespondingType() {
return returnType;
}
node.setKind(IProgramElement.Kind.ADVICE);
if (ad.kind == AdviceKind.Around) {
- node.setReturnType(ad.returnType.toString()); //returnTypeToString(0));
+ node.setCorrespondingType(ad.returnType.toString()); //returnTypeToString(0));
}
String details = "";
node.setKind(IProgramElement.Kind.ERROR);
}
node.setName(name);
- node.setReturnType(itd.returnType.toString());
+ node.setCorrespondingType(itd.returnType.toString());
if (node.getKind() != IProgramElement.Kind.INTER_TYPE_FIELD) {
setParameters(methodDeclaration, node);
}
formatter.genLabelAndKind(methodDeclaration, peNode);
genBytecodeInfo(methodDeclaration, peNode);
peNode.setModifiers(methodDeclaration.modifiers);
+ peNode.setCorrespondingType(methodDeclaration.returnType.toString());
// TODO: add return type test
if (peNode.getKind().equals(IProgramElement.Kind.METHOD)) {
((IProgramElement)stack.peek()).setRunnable(true);
}
}
+
stack.push(peNode);
return true;
}
makeLocation(fieldDeclaration),
fieldDeclaration.modifiers,
"",
- new ArrayList());
+ new ArrayList());
+
+ peNode.setCorrespondingType(fieldDeclaration.type.toString());
+
((IProgramElement)stack.peek()).addChild(peNode);
stack.push(peNode);
return true;