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/NewArrayOperator.java

32 lines
867 B

package jode;
import sun.tools.java.Type;
public class NewArrayOperator extends SimpleOperator {
String baseTypeString;
public NewArrayOperator(Type arrayType, String baseTypeString,
int dimensions) {
super(arrayType, 0, dimensions);
for (int i=0; i< dimensions; i++) {
operandTypes[i] = MyType.tUIndex;
}
this.baseTypeString = baseTypeString;
}
public int getPriority() {
return 900;
}
public int getOperandPriority(int i) {
return 0;
}
public String toString(String[] operands) {
StringBuffer result
= new StringBuffer("new ").append(baseTypeString);
for (int i=0; i< getOperandCount(); i++) {
result.append("[").append(operands[i]).append("]");
}
return result.toString();
}
}