/** * Creates a new inline constant refactoring. * <p> * This constructor is only used by <code>DelegateCreator</code>. * </p> * * @param field the field to inline */ public InlineConstantRefactoring(IField field) { Assert.isNotNull(field); Assert.isTrue(!field.isBinary()); fField= field; }
/** * Creates a new inline constant refactoring. * <p> * This constructor is only used by <code>DelegateCreator</code>. * </p> * * @param field the field to inline */ public InlineConstantRefactoring(IField field) { Assert.isNotNull(field); Assert.isTrue(!field.isBinary()); fField= field; }
/** * Creates a new inline constant refactoring. * <p> * This constructor is only used by <code>DelegateCreator</code>. * </p> * * @param field the field to inline */ public InlineConstantRefactoring(IField field) { Assert.isNotNull(field); Assert.isTrue(!field.isBinary()); fField= field; }
private static boolean isBinaryPrimitiveConstantOrString(IJavaElement element) { if (element != null && element.getElementType() == IJavaElement.FIELD) { IField field= (IField)element; int flags; try { flags= field.getFlags(); } catch (JavaModelException ex) { return false; } return field.isBinary() && Flags.isStatic(flags) && Flags.isFinal(flags) && isPrimitiveOrString(field); } return false; }
if (field.exists()) { if (uniqueKey != null) { if(field.isBinary()) { ResolvedBinaryField resolvedField = new ResolvedBinaryField( (JavaElement)field.getParent(),
/** * 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); }
if (field.exists()) { if (uniqueKey != null) { if(field.isBinary()) { ResolvedBinaryField resolvedField = new ResolvedBinaryField( (JavaElement)field.getParent(),
if (field.exists()) { if (uniqueKey != null) { if(field.isBinary()) { ResolvedBinaryField resolvedField = new ResolvedBinaryField( (JavaElement)field.getParent(),
if (field.exists()) { if (uniqueKey != null) { if(field.isBinary()) { ResolvedBinaryField resolvedField = new ResolvedBinaryField( (JavaElement)field.getParent(),
if (field.exists()) { if (uniqueKey != null) { if(field.isBinary()) { ResolvedBinaryField resolvedField = new ResolvedBinaryField( (JavaElement)field.getParent(),
if (field.exists()) { if (uniqueKey != null) { if(field.isBinary()) { ResolvedBinaryField resolvedField = new ResolvedBinaryField( (JavaElement)field.getParent(),
if (field.exists()) { char[] uniqueKey = fieldBinding.computeUniqueKey(); if(field.isBinary()) { ResolvedBinaryField resolvedField = new ResolvedBinaryField( (JavaElement)field.getParent(),
if (field.exists()) { char[] uniqueKey = fieldBinding.computeUniqueKey(); if(field.isBinary()) { ResolvedBinaryField resolvedField = new ResolvedBinaryField( (JavaElement)field.getParent(),
if (field.exists()) { char[] uniqueKey = fieldBinding.computeUniqueKey(); if(field.isBinary()) { ResolvedBinaryField resolvedField = new ResolvedBinaryField( (JavaElement)field.getParent(),
if (field.exists()) { char[] uniqueKey = fieldBinding.computeUniqueKey(); if(field.isBinary()) { ResolvedBinaryField resolvedField = new ResolvedBinaryField( (JavaElement)field.getParent(),
if (field.exists()) { char[] uniqueKey = fieldBinding.computeUniqueKey(); if(field.isBinary()) { ResolvedBinaryField resolvedField = new ResolvedBinaryField( (JavaElement)field.getParent(),
if (field.exists()) { char[] uniqueKey = fieldBinding.computeUniqueKey(); if(field.isBinary()) { ResolvedBinaryField resolvedField = new ResolvedBinaryField( (JavaElement)field.getParent(),
typeSimpleName = CharOperation.subarray(typeErasure, lastDot + 1, typeErasure.length); typeQualification = CharOperation.subarray(typeErasure, 0, lastDot); if (!field.isBinary()) {