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

36 lines
700 B

package jode;
import sun.tools.java.Type;
public class ConvertOperator extends Operator {
Type from;
public ConvertOperator(Type from, Type to) {
super(to, 0);
this.from = from;
}
public int getPriority() {
return 700;
}
public int getOperandPriority(int i) {
return 700;
}
public int getOperandCount() {
return 1;
}
public Type getOperandType(int i) {
return from;
}
public void setOperandType(Type[] inputTypes) {
from = MyType.intersection(from, inputTypes[0]);
}
public String toString(String[] operands)
{
return "("+type.toString()+") "+operands[0];
}
}