本文整理匯總了Java中org.eclipse.jdt.core.compiler.IProblem.RedundantNullDefaultAnnotationPackage方法的典型用法代碼示例。如果您正苦於以下問題:Java IProblem.RedundantNullDefaultAnnotationPackage方法的具體用法?Java IProblem.RedundantNullDefaultAnnotationPackage怎麽用?Java IProblem.RedundantNullDefaultAnnotationPackage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.jdt.core.compiler.IProblem
的用法示例。
在下文中一共展示了IProblem.RedundantNullDefaultAnnotationPackage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createRemoveRedundantNullAnnotationsOperations
import org.eclipse.jdt.core.compiler.IProblem; //導入方法依賴的package包/類
private static void createRemoveRedundantNullAnnotationsOperations(
CompilationUnit compilationUnit,
IProblemLocation[] locations,
List<CompilationUnitRewriteOperation> result) {
for (int i = 0; i < locations.length; i++) {
IProblemLocation problem = locations[i];
if (problem == null) continue; // problem was filtered out by createCleanUp()
int problemId = problem.getProblemId();
if (problemId == IProblem.RedundantNullAnnotation
|| problemId == IProblem.RedundantNullDefaultAnnotationPackage
|| problemId == IProblem.RedundantNullDefaultAnnotationType
|| problemId == IProblem.RedundantNullDefaultAnnotationMethod) {
RemoveRedundantAnnotationRewriteOperation operation =
new RemoveRedundantAnnotationRewriteOperation(compilationUnit, problem);
result.add(operation);
}
}
}
示例2: getStepDescriptions
import org.eclipse.jdt.core.compiler.IProblem; //導入方法依賴的package包/類
/** {@inheritDoc} */
@Override
public String[] getStepDescriptions() {
List<String> result = new ArrayList<String>();
switch (this.handledProblemID) {
case IProblem.NonNullLocalVariableComparisonYieldsFalse:
case IProblem.RedundantNullCheckOnNonNullLocalVariable:
case IProblem.RequiredNonNullButProvidedNull:
case IProblem.RequiredNonNullButProvidedPotentialNull:
case IProblem.RequiredNonNullButProvidedSpecdNullable:
case IProblem.RequiredNonNullButProvidedUnknown:
case IProblem.IllegalDefinitionToNonNullParameter:
case IProblem.IllegalRedefinitionToNonNullParameter:
case IProblem.ParameterLackingNullableAnnotation:
result.add(MultiFixMessages.NullAnnotationsCleanUp_add_nullable_annotation);
break;
case IProblem.ParameterLackingNonNullAnnotation:
result.add(MultiFixMessages.NullAnnotationsCleanUp_add_nonnull_annotation);
break;
case IProblem.RedundantNullAnnotation:
case IProblem.RedundantNullDefaultAnnotationPackage:
case IProblem.RedundantNullDefaultAnnotationType:
case IProblem.RedundantNullDefaultAnnotationMethod:
result.add(MultiFixMessages.NullAnnotationsCleanUp_remove_redundant_nullness_annotation);
break;
}
return result.toArray(new String[result.size()]);
}