Available Methods
- isError ( )
- getID ( )
- getSourceStart ( )
- UnusedPrivateField ( )
- getSourceEnd ( )
- IllegalRedefinitionToNonNullParameter ( )
- JavadocDuplicateThrowsClassName ( )
- UndefinedType ( )
- RedundantNullDefaultAnnotationType ( )
- LocalVariableIsNeverUsed ( )
- CannotOverrideAStaticMethodWithAnInstanceMethod ( )
- UndefinedMethod ( )
- Task ( )
- JavadocUnexpectedTag ( )
- EnumConstantMustImplementAbstractMethod ( )
- ImportNotFound ( )
- UndefinedName ( )
- ArgumentIsNeverUsed ( )
- IllegalModifierCombinationFinalVolatileForField ( )
- AmbiguousType ( )
- CannotImportPackage ( )
- JavadocInvalidTag ( )
- IllegalDefinitionToNonNullParameter ( )
- ForbiddenReference ( )
- NonStaticFieldFromStaticInvocation ( )
- UnusedTypeParameter ( )
- UnnecessaryCast ( )
- MissingOverrideAnnotationForInterfaceMethodImplementation ( )
- NonStaticAccessToStaticMethod ( )
- IllegalModifierForVariable ( )
- MethodReducesVisibility ( )
- IllegalModifierForInterfaceMethod ( )
- RequiredNonNullButProvidedNull ( )
- ParsingErrorMergeTokens ( )
- ShouldReturnValue ( )
- FieldHidingField ( )
- ArgumentHidingField ( )
- UnqualifiedFieldAccess ( )
- UnterminatedString ( )
- LocalVariableHidingLocalVariable ( )
- UnusedPrivateConstructor ( )
- InvalidUsageOfForeachStatements ( )
- DuplicateNestedType ( )
- MissingEnumConstantCase ( )
- UnusedImport ( )
- DuplicateField ( )
- ConflictingImport ( )
- NotVisibleField ( )
- DuplicateBlankFinalFieldInitialization ( )
- IllegalModifierForEnumConstructor ( )
- IllegalModifierForConstructor ( )
- PackageIsNotExpectedPackage ( )
- NonExternalizedStringLiteral ( )
- JavadocAmbiguousType ( )
- ReturnTypeMismatch ( )
- IllegalModifierForEnum ( )
- InvalidInput ( )
- NullSourceString ( )
- UnresolvedVariable ( )
- IllegalReturnNullityRedefinition ( )
- UseEnumAsAnIdentifier ( )
- UnexpectedStaticModifierForField ( )
- IllegalModifierForMemberEnum ( )
- EnumAbstractMethodMustBeImplemented ( )
- MethodCanBePotentiallyStatic ( )
- TypeMissingDeprecatedAnnotation ( )
- RedundantSpecificationOfTypeArguments ( )
- IncompatibleExceptionInThrowsClause ( )
- UnhandledWarningToken ( )
- NonStaticOrAlienTypeReceiver ( )
- ParsingErrorInsertToCompletePhrase ( )
- ParsingErrorNoSuggestion ( )
- UnhandledExceptionInDefaultConstructor ( )
- RawTypeReference ( )
- UndefinedAnnotationMember ( )
- AbstractMethodMustBeImplemented ( )
Related Classes
- java.util.Arrays
- java.io.File
- java.io.InputStream
- java.util.Iterator
- java.util.Locale
- org.eclipse.core.runtime.CoreException
- org.eclipse.core.runtime.NullProgressMonitor
- org.eclipse.jdt.core.dom.CompilationUnit
- org.eclipse.jdt.core.IJavaProject
- org.eclipse.jdt.core.JavaModelException
- org.eclipse.jdt.core.ICompilationUnit
- org.eclipse.jdt.core.dom.SimpleName
- org.eclipse.jdt.core.dom.ASTNode
- org.eclipse.jdt.core.dom.Modifier
- org.eclipse.jdt.core.IPackageFragment
- org.eclipse.jdt.core.dom.ITypeBinding
- org.eclipse.jdt.internal.compiler.impl.CompilerOptions
- org.eclipse.jdt.core.dom.IMethodBinding
- org.eclipse.ltk.core.refactoring.RefactoringStatus
- org.eclipse.jdt.core.search.IJavaSearchConstants
- org.eclipse.jdt.core.dom.BodyDeclaration
- org.eclipse.lsp4j.TextDocumentIdentifier
- org.eclipse.jdt.internal.compiler.env.ICompilationUnit
- org.eclipse.lsp4j.Range
- org.eclipse.lsp4j.jsonrpc.messages.Either
Java Code Examples for org.eclipse.jdt.core.compiler.IProblem#MethodReducesVisibility
The following examples show how to use
org.eclipse.jdt.core.compiler.IProblem#MethodReducesVisibility .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VisibilityQuickFixTest.java From eclipse.jdt.ls with Eclipse Public License 2.0 | 5 votes |
@Test public void testMethodReducesVisibility() throws Exception { int problem = IProblem.MethodReducesVisibility; IPackageFragment pack1 = fSourceFolder.createPackageFragment("test1", false, null); StringBuilder bufB = new StringBuilder(); bufB.append("package test1;\n"); bufB.append("public class B {\n"); bufB.append(" public void foo() {\n"); bufB.append(" }\n"); bufB.append("}\n"); pack1.createCompilationUnit("B.java", bufB.toString(), false, null); StringBuilder buf = new StringBuilder(); buf.append("package test1;\n"); buf.append("import B;\n"); buf.append("public class A extends B {\n"); buf.append(" private void foo() {\n"); buf.append(" }\n"); buf.append("}\n"); ICompilationUnit cu = pack1.createCompilationUnit("A.java", buf.toString(), false, null); buf = new StringBuilder(); buf.append("package test1;\n"); buf.append("import B;\n"); buf.append("public class A extends B {\n"); buf.append(" public void foo() {\n"); buf.append(" }\n"); buf.append("}\n"); Expected e1 = new Expected("Change visibility of 'A.foo' to 'public'", buf.toString()); assertCodeActions(cu, e1); }