public boolean equals(Object object) { if (object == null || this.getClass() != object.getClass()) { return false; } KeepClassSpecification other = (KeepClassSpecification)object; return this.markClasses == other.markClasses && this.markConditionally == other.markConditionally && this.allowShrinking == other.allowShrinking && this.allowOptimization == other.allowOptimization && this.allowObfuscation == other.allowObfuscation && super.equals(other); }
@Override public boolean equals(Object object) { if (object == null || this.getClass() != object.getClass()) { return false; } KeepClassSpecification other = (KeepClassSpecification)object; return this.markClasses == other.markClasses && this.markConditionally == other.markConditionally && this.markDescriptorClasses == other.markDescriptorClasses && this.markCodeAttributes == other.markCodeAttributes && this.allowShrinking == other.allowShrinking && this.allowOptimization == other.allowOptimization && this.allowObfuscation == other.allowObfuscation && (this.condition == null ? other.condition == null : this.condition .equals(other.condition)) && super.equals(other); }
@Override public boolean equals(Object object) { if (object == null || this.getClass() != object.getClass()) { return false; } KeepClassSpecification other = (KeepClassSpecification)object; return this.markClasses == other.markClasses && this.markConditionally == other.markConditionally && this.markDescriptorClasses == other.markDescriptorClasses && this.markCodeAttributes == other.markCodeAttributes && this.allowShrinking == other.allowShrinking && this.allowOptimization == other.allowOptimization && this.allowObfuscation == other.allowObfuscation && (this.condition == null ? other.condition == null : this.condition .equals(other.condition)) && super.equals(other); }
@Override public boolean equals(Object object) { if (object == null || this.getClass() != object.getClass()) { return false; } KeepClassSpecification other = (KeepClassSpecification)object; return this.markClasses == other.markClasses && this.markConditionally == other.markConditionally && this.markDescriptorClasses == other.markDescriptorClasses && this.markCodeAttributes == other.markCodeAttributes && this.allowShrinking == other.allowShrinking && this.allowOptimization == other.allowOptimization && this.allowObfuscation == other.allowObfuscation && (this.condition == null ? other.condition == null : this.condition .equals(other.condition)) && super.equals(other); }
/** * Looks in the given list for a class specification that is identical to * the given template. Returns true if it is found, and removes the matching * class specification as a side effect. */ private boolean findClassSpecification(ClassSpecification classSpecificationTemplate, List classSpecifications) { if (classSpecifications == null) { return false; } for (int index = 0; index < classSpecifications.size(); index++) { if (classSpecificationTemplate.equals(classSpecifications.get(index))) { // Remove the matching option as a side effect. classSpecifications.remove(index); return true; } } return false; }
/** * Returns the KeepClassSpecification currently represented in this dialog. */ public KeepClassSpecification getKeepSpecification() { boolean markClasses = !keepClassMembersRadioButton .isSelected(); boolean markConditionally = keepClassesWithMembersRadioButton.isSelected(); boolean markDescriptorClasses = keepDescriptorClassesCheckBox .isSelected(); boolean markCodeAttributes = keepCodeCheckBox .isSelected(); boolean allowShrinking = allowShrinkingCheckBox .isSelected(); boolean allowOptimization = allowOptimizationCheckBox .isSelected(); boolean allowObfuscation = allowObfuscationCheckBox .isSelected(); ClassSpecification condition = conditionDialog .getClassSpecification(); return new KeepClassSpecification(markClasses, markConditionally, markDescriptorClasses, markCodeAttributes, allowShrinking, allowOptimization, allowObfuscation, condition.equals(new ClassSpecification()) ? null : condition, getClassSpecification()); }
public void actionPerformed(ActionEvent actionEvent) { final ClassSpecification originalCondition = conditionDialog.getClassSpecification(); int returnValue = conditionDialog.showDialog(); if (returnValue == APPROVE_OPTION) { // Update the condition label. ClassSpecification condition = conditionDialog.getClassSpecification(); conditionCommentsField.setText(label(condition.equals(new ClassSpecification()) ? null : condition)); } else { // Reset to the original condition. conditionDialog.setClassSpecification(originalCondition); } } });