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

34 lines
877 B

package jode;
import sun.tools.java.Type;
public class UnaryOperator extends SimpleOperator {
public UnaryOperator(int addr, int length, Type type, int op) {
super(addr,length, type, op, 1);
}
public int getPriority() {
return 700;
}
public int getOperandPriority(int i) {
return getPriority();
}
/**
* Sets the return type of this operator.
* @return true if the operand types changed
*/
public boolean setType(Type type) {
super.setType(type);
Type newOpType = UnknownType.commonType(type, operandTypes[0]);
if (newOpType != operandTypes[0]) {
operandTypes[0] = newOpType;
return true;
}
return false;
}
public String toString(CodeAnalyzer ca, String[] operands) {
return getOperatorString() + operands[0];
}
}