Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/UnsignedRightShiftOperator.java')
-rw-r--r--org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/UnsignedRightShiftOperator.java68
1 files changed, 43 insertions, 25 deletions
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/UnsignedRightShiftOperator.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/UnsignedRightShiftOperator.java
index ecbc0aa04..216c5bc2c 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/UnsignedRightShiftOperator.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/UnsignedRightShiftOperator.java
@@ -14,85 +14,103 @@ import org.eclipse.jdt.debug.core.IJavaPrimitiveValue;
import org.eclipse.jdt.debug.core.IJavaValue;
public class UnsignedRightShiftOperator extends BinaryOperator {
- public UnsignedRightShiftOperator(int resultId, int leftTypeId, int rightTypeId, int start) {
+ public UnsignedRightShiftOperator(int resultId, int leftTypeId,
+ int rightTypeId, int start) {
this(resultId, leftTypeId, rightTypeId, false, start);
}
- public UnsignedRightShiftOperator(int resultId, int leftTypeId, int rightTypeId, boolean isAssignmentOperator, int start) {
+ public UnsignedRightShiftOperator(int resultId, int leftTypeId,
+ int rightTypeId, boolean isAssignmentOperator, int start) {
super(resultId, leftTypeId, rightTypeId, isAssignmentOperator, start);
}
/*
* @see BinaryOperator#getBooleanResult(IJavaValue, IJavaValue)
*/
- protected boolean getBooleanResult(IJavaValue leftOperand, IJavaValue rightOperand) {
+ @Override
+ protected boolean getBooleanResult(IJavaValue leftOperand,
+ IJavaValue rightOperand) {
return false;
}
/*
* @see BinaryOperator#getDoubleResult(IJavaValue, IJavaValue)
*/
- protected double getDoubleResult(IJavaValue leftOperand, IJavaValue rightOperand) {
+ @Override
+ protected double getDoubleResult(IJavaValue leftOperand,
+ IJavaValue rightOperand) {
return 0;
}
/*
* @see BinaryOperator#getFloatResult(IJavaValue, IJavaValue)
*/
- protected float getFloatResult(IJavaValue leftOperand, IJavaValue rightOperand) {
+ @Override
+ protected float getFloatResult(IJavaValue leftOperand,
+ IJavaValue rightOperand) {
return 0;
}
/*
* @see BinaryOperator#getIntResult(IJavaValue, IJavaValue)
*/
+ @Override
protected int getIntResult(IJavaValue leftOperand, IJavaValue rightOperand) {
// unary type promotion on both operands see 5.6.1 and 15.18
switch (fRightTypeId) {
- case T_long :
- return ((IJavaPrimitiveValue) leftOperand).getIntValue() >>> ((IJavaPrimitiveValue) rightOperand).getLongValue();
- case T_int :
- case T_short :
- case T_byte :
- case T_char :
- return ((IJavaPrimitiveValue) leftOperand).getIntValue() >>> ((IJavaPrimitiveValue) rightOperand).getIntValue();
- default :
- return 0;
+ case T_long:
+ return ((IJavaPrimitiveValue) leftOperand).getIntValue() >>> ((IJavaPrimitiveValue) rightOperand)
+ .getLongValue();
+ case T_int:
+ case T_short:
+ case T_byte:
+ case T_char:
+ return ((IJavaPrimitiveValue) leftOperand).getIntValue() >>> ((IJavaPrimitiveValue) rightOperand)
+ .getIntValue();
+ default:
+ return 0;
}
}
/*
* @see BinaryOperator#getLongResult(IJavaValue, IJavaValue)
*/
+ @Override
protected long getLongResult(IJavaValue leftOperand, IJavaValue rightOperand) {
// unary type promotion on both operands see 5.6.1 and 15.18
switch (fRightTypeId) {
- case T_long :
- return ((IJavaPrimitiveValue) leftOperand).getLongValue() >>> ((IJavaPrimitiveValue) rightOperand).getLongValue();
- case T_int :
- case T_short :
- case T_byte :
- case T_char :
- return ((IJavaPrimitiveValue) leftOperand).getLongValue() >>> ((IJavaPrimitiveValue) rightOperand).getIntValue();
- default :
- return 0;
+ case T_long:
+ return ((IJavaPrimitiveValue) leftOperand).getLongValue() >>> ((IJavaPrimitiveValue) rightOperand)
+ .getLongValue();
+ case T_int:
+ case T_short:
+ case T_byte:
+ case T_char:
+ return ((IJavaPrimitiveValue) leftOperand).getLongValue() >>> ((IJavaPrimitiveValue) rightOperand)
+ .getIntValue();
+ default:
+ return 0;
}
}
/*
* @see BinaryOperator#getStringResult(IJavaValue, IJavaValue)
*/
- protected String getStringResult(IJavaValue leftOperand, IJavaValue rightOperand) {
+ @Override
+ protected String getStringResult(IJavaValue leftOperand,
+ IJavaValue rightOperand) {
return null;
}
+ @Override
protected int getInternResultType() {
// unary type promotion on both operands see 5.6.1 and 15.18
return getUnaryPromotionType(fLeftTypeId);
}
+ @Override
public String toString() {
- return InstructionsEvaluationMessages.UnsignedRightShiftOperator________operator_1;
+ return InstructionsEvaluationMessages.UnsignedRightShiftOperator________operator_1;
}
}

Back to the top