Mirror of the JODE repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
jode/jode/jode/expr/ReturnOperator.java

25 lines
647 B

package jode;
import sun.tools.java.Type;
public class ReturnOperator extends SimpleOperator {
public ReturnOperator(Type type) {
super(Type.tVoid, 0, (type == Type.tVoid)?0:1);
if (type != Type.tVoid)
operandTypes[0] = MyType.tSubType(type);
}
public int getPriority() {
return 0;
}
public int getOperandPriority(int i) {
return 0;
}
public String toString(String[] operands) {
StringBuffer result = new StringBuffer("return");
if (getOperandCount() != 0)
result.append(" ").append(operands[0]);
return result.toString();
}
}