/** * Adjusts the visibility of the referenced field found in a compilation unit. * * @param field the referenced field to adjust * @param threshold the visibility threshold, or <code>null</code> for default visibility * @throws JavaModelException if an error occurs */ private void adjustOutgoingVisibility(final IField field, final ModifierKeyword threshold) throws JavaModelException { Assert.isTrue(!field.isBinary() && !field.isReadOnly()); //bug 100555 (moving inner class to top level class; taking private fields with you) final IType declaring= field.getDeclaringType(); if (declaring != null && declaring.equals(fReferenced)) return; if (hasLowerVisibility(field.getFlags(), keywordToVisibility(threshold)) && needsVisibilityAdjustment(field, threshold)) adjustOutgoingVisibility(field, threshold, RefactoringCoreMessages.MemberVisibilityAdjustor_change_visibility_field_warning); }
/** * Adjusts the visibility of the referenced field found in a compilation unit. * * @param field the referenced field to adjust * @param threshold the visibility threshold, or <code>null</code> for default visibility * @throws JavaModelException if an error occurs */ private void adjustOutgoingVisibility(final IField field, final ModifierKeyword threshold) throws JavaModelException { Assert.isTrue(!field.isBinary() && !field.isReadOnly()); //bug 100555 (moving inner class to top level class; taking private fields with you) final IType declaring= field.getDeclaringType(); if (declaring != null && declaring.equals(fReferenced)) return; if (hasLowerVisibility(field.getFlags(), keywordToVisibility(threshold)) && needsVisibilityAdjustment(field, threshold)) adjustOutgoingVisibility(field, threshold, RefactoringCoreMessages.MemberVisibilityAdjustor_change_visibility_field_warning); }
/** * Adjusts the visibility of the referenced field found in a compilation unit. * * @param field the referenced field to adjust * @param threshold the visibility threshold, or <code>null</code> for default visibility * @throws JavaModelException if an error occurs */ private void adjustOutgoingVisibility(final IField field, final ModifierKeyword threshold) throws JavaModelException { Assert.isTrue(!field.isBinary() && !field.isReadOnly()); //bug 100555 (moving inner class to top level class; taking private fields with you) final IType declaring= field.getDeclaringType(); if (declaring != null && declaring.equals(fReferenced)) return; if (hasLowerVisibility(field.getFlags(), keywordToVisibility(threshold)) && needsVisibilityAdjustment(field, threshold)) adjustOutgoingVisibility(field, threshold, RefactoringCoreMessages.MemberVisibilityAdjustor_change_visibility_field_warning); }