org.eclipse.jdt.core.compiler
类 CategorizedProblem

java.lang.Object
  继承者 org.eclipse.jdt.core.compiler.CategorizedProblem
所有已实现的接口:
IProblem
直接已知子类:
DefaultProblem

public abstract class CategorizedProblem
extends Object
implements IProblem

Richer description of a Java problem, as detected by the compiler or some of the underlying technology reusing the compiler. With the introduction of org.eclipse.jdt.core.compiler.CompilationParticipant, the simpler problem interface IProblem did not carry enough information to better separate and categorize Java problems. In order to minimize impact on existing API, Java problems are still passed around as IProblem, though actual implementations should explicitly extend CategorizedProblem. Participants can produce their own problem definitions, and given these are categorized problems, they can be better handled by clients (such as user interface).

A categorized problem provides access to:

Note: the compiler produces IProblems internally, which are turned into markers by the JavaBuilder so as to persist problem descriptions. This explains why there is no API allowing to reach IProblem detected when compiling. However, the Java problem markers carry equivalent information to IProblem, in particular their ID (attribute "id") is set to one of the IDs defined on this interface.

Note: Standard Java problems produced by Java default tooling will be subclasses of this class. Technically, most API methods dealing with problems are referring to IProblem for backward compatibility reason. It is intended that CategorizedProblem will be subclassed for custom problem implementation when participating in compilation operations, so as to allow participant to contribute their own marker types, and thus defining their own domain specific problem/category IDs.

Note: standard Java problems produced by Java default tooling will set the marker IMarker#SOURCE_ID attribute to JavaBuilder#SOURCE_ID; compiler participants may specify the IMarker#SOURCE_ID attribute of their markers by adding it to the extra marker attributes of the problems they generate; markers resulting from compiler participants' problems that do not have the IMarker#SOURCE_ID extra attribute set do not have the JavaBuilder#SOURCE_ID attribute set either.

从以下版本开始:
3.2

字段摘要
static int CAT_BUILDPATH
          Category for problems related to buildpath
static int CAT_CODE_STYLE
          Category for optional problems related to coding style practices
static int CAT_DEPRECATION
          Category for optional problems related to deprecation
static int CAT_IMPORT
          Category for fatal problems in import statements
static int CAT_INTERNAL
          Category for fatal problems which could not be addressed by external changes, but require an edit to be addressed
static int CAT_JAVADOC
          Category for optional problems in Javadoc
static int CAT_MEMBER
          Category for fatal problems related to type members, could be addressed by some field or method change
static int CAT_NAME_SHADOWING_CONFLICT
          Category for optional problems related to naming conflicts
static int CAT_NLS
          Category for optional problems related to internationalization of String literals
static int CAT_POTENTIAL_PROGRAMMING_PROBLEM
          Category for optional problems related to potential programming flaws
static int CAT_RESTRICTION
          Category for optional problems related to access restrictions
static int CAT_SYNTAX
          Category for fatal problems related to syntax
static int CAT_TYPE
          Category for fatal problems related to types, could be addressed by some type change
static int CAT_UNCHECKED_RAW
          Category for optional problems related to type safety in generics
static int CAT_UNNECESSARY_CODE
          Category for optional problems related to unnecessary code
static int CAT_UNSPECIFIED
          List of standard category IDs used by Java problems, more categories will be added in the future.
 
从接口 org.eclipse.jdt.core.compiler.IProblem 继承的字段
AbstractMethodCannotBeOverridden, AbstractMethodInAbstractClass, AbstractMethodInEnum, AbstractMethodMustBeImplemented, AbstractMethodMustBeImplementedOverConcreteMethod, AbstractMethodsInConcreteClass, AmbiguousConstructor, AmbiguousConstructorInDefaultConstructor, AmbiguousConstructorInImplicitConstructorCall, AmbiguousField, AmbiguousMethod, AmbiguousType, AnnotationCannotOverrideMethod, AnnotationCircularity, AnnotationCircularitySelfReference, AnnotationFieldNeedConstantInitialization, AnnotationMembersCannotHaveParameters, AnnotationMembersCannotHaveTypeParameters, AnnotationTypeDeclarationCannotHaveConstructor, AnnotationTypeDeclarationCannotHaveSuperclass, AnnotationTypeDeclarationCannotHaveSuperinterfaces, AnnotationTypeUsedAsSuperInterface, AnnotationValueMustBeAnEnumConstant, AnnotationValueMustBeAnnotation, AnnotationValueMustBeArrayInitializer, AnnotationValueMustBeClassLiteral, AnnotationValueMustBeConstant, AnonymousClassCannotExtendFinalClass, ArgumentHidingField, ArgumentHidingLocalVariable, ArgumentIsNeverUsed, ArgumentTypeAmbiguous, ArgumentTypeCannotBeVoid, ArgumentTypeCannotBeVoidArray, ArgumentTypeInheritedNameHidesEnclosingName, ArgumentTypeInternalNameProvided, ArgumentTypeNotFound, ArgumentTypeNotVisible, ArrayConstantsOnlyInArrayInitializers, ArrayReferenceRequired, AssignmentHasNoEffect, AssignmentToMultiCatchParameter, AssignmentToResource, AutoManagedResourceNotBelow17, BinaryLiteralNotBelow17, BodyForAbstractMethod, BodyForNativeMethod, BoundCannotBeArray, BoundHasConflictingArguments, BoundMustBeAnInterface, BoxingConversion, BytecodeExceeds64KLimit, BytecodeExceeds64KLimitForClinit, BytecodeExceeds64KLimitForConstructor, CannotAllocateVoidArray, CannotDeclareEnumSpecialMethod, CannotDefineAnnotationInLocalType, CannotDefineDimensionExpressionsWithInit, CannotDefineEnumInLocalType, CannotDefineInterfaceInLocalType, CannotDefineStaticInitializerInLocalType, CannotExtendEnum, CannotHideAnInstanceMethodWithAStaticMethod, CannotImportPackage, CannotInferElidedTypes, CannotInvokeSuperConstructorInEnum, CannotOverrideAStaticMethodWithAnInstanceMethod, CannotReadSource, CannotReturnInInitializer, CannotThrowNull, CannotThrowType, CannotUseDiamondWithAnonymousClasses, CannotUseDiamondWithExplicitTypeArguments, CannotUseSuperInCodeSnippet, ClassExtendFinalClass, CodeCannotBeReached, CodeSnippetMissingClass, CodeSnippetMissingMethod, ComparingIdentical, ConflictingImport, ConstructorRelated, ConstructorVarargsArgumentNeedCast, CorruptedSignature, DeadCode, DiamondNotBelow17, DirectInvocationOfAbstractMethod, DisallowedTargetForAnnotation, DiscouragedReference, DuplicateAnnotation, DuplicateAnnotationMember, DuplicateBlankFinalFieldInitialization, DuplicateBounds, DuplicateCase, DuplicateDefaultCase, DuplicateField, DuplicateFinalLocalInitialization, DuplicateImport, DuplicateInheritedMethods, DuplicateLabel, DuplicateMethod, DuplicateMethodErasure, DuplicateModifierForArgument, DuplicateModifierForField, DuplicateModifierForMethod, DuplicateModifierForType, DuplicateModifierForVariable, DuplicateNestedType, DuplicateParameterizedMethods, DuplicateSuperInterface, DuplicateTargetInTargetAnnotation, DuplicateTypes, DuplicateTypeVariable, EmptyControlFlowStatement, EnclosingInstanceInConstructorCall, EndOfSource, EnumAbstractMethodMustBeImplemented, EnumConstantCannotDefineAbstractMethod, EnumConstantMustImplementAbstractMethod, EnumConstantsCannotBeSurroundedByParenthesis, EnumStaticFieldInInInitializerContext, EnumSwitchCannotTargetField, ExceptionTypeAmbiguous, ExceptionTypeInheritedNameHidesEnclosingName, ExceptionTypeInternalNameProvided, ExceptionTypeNotFound, ExceptionTypeNotVisible, ExpressionShouldBeAVariable, ExternalProblemFixable, ExternalProblemNotFixable, FallthroughCase, FieldHidingField, FieldHidingLocalVariable, FieldMissingDeprecatedAnnotation, FieldRelated, FieldTypeAmbiguous, FieldTypeInheritedNameHidesEnclosingName, FieldTypeInternalNameProvided, FieldTypeNotFound, FieldTypeNotVisible, FinalBoundForTypeVariable, FinalFieldAssignment, FinallyMustCompleteNormally, FinalMethodCannotBeOverridden, FinalOuterLocalAssignment, ForbiddenReference, GenericConstructorTypeArgumentMismatch, GenericMethodTypeArgumentMismatch, GenericTypeCannotExtendThrowable, HidingEnclosingType, HierarchyCircularity, HierarchyCircularitySelfReference, HierarchyHasProblems, IgnoreCategoriesMask, IllegalAbstractModifierCombinationForMethod, IllegalAccessFromTypeVariable, IllegalCast, IllegalClassLiteralForTypeVariable, IllegalDimension, IllegalEnclosingInstanceSpecification, IllegalExtendedDimensions, IllegalExtendedDimensionsForVarArgs, IllegalGenericArray, IllegalHexaLiteral, IllegalInstanceofParameterizedType, IllegalInstanceofTypeParameter, IllegalModifierCombinationFinalAbstractForClass, IllegalModifierCombinationFinalVolatileForField, IllegalModifierForAnnotationField, IllegalModifierForAnnotationMemberType, IllegalModifierForAnnotationMethod, IllegalModifierForAnnotationType, IllegalModifierForArgument, IllegalModifierForClass, IllegalModifierForConstructor, IllegalModifierForEnum, IllegalModifierForEnumConstant, IllegalModifierForEnumConstructor, IllegalModifierForField, IllegalModifierForInterface, IllegalModifierForInterfaceField, IllegalModifierForInterfaceMethod, IllegalModifierForLocalClass, IllegalModifierForLocalEnum, IllegalModifierForMemberClass, IllegalModifierForMemberEnum, IllegalModifierForMemberInterface, IllegalModifierForMethod, IllegalModifierForVariable, IllegalPrimitiveOrArrayTypeForEnclosingInstance, IllegalQualifiedEnumConstantLabel, IllegalQualifiedParameterizedTypeAllocation, IllegalStaticModifierForMemberType, IllegalTypeVariableSuperReference, IllegalUnderscorePosition, IllegalUsageOfQualifiedTypeReference, IllegalVararg, IllegalVisibilityModifierCombinationForField, IllegalVisibilityModifierCombinationForMemberType, IllegalVisibilityModifierCombinationForMethod, IllegalVisibilityModifierForInterfaceMemberType, ImportAmbiguous, ImportInheritedNameHidesEnclosingName, ImportInternalNameProvided, ImportNotFound, ImportNotVisible, ImportRelated, IncompatibleExceptionInInheritedMethodThrowsClause, IncompatibleExceptionInThrowsClause, IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod, IncompatibleReturnType, IncompatibleReturnTypeForNonInheritedInterfaceMethod, IncompatibleTypesInConditionalOperator, IncompatibleTypesInEqualityOperator, IncompatibleTypesInForeach, IncorrectArityForParameterizedConstructor, IncorrectArityForParameterizedMethod, IncorrectArityForParameterizedType, IncorrectEnclosingInstanceReference, IncorrectSwitchType, IncorrectSwitchType17, IndirectAccessToStaticField, IndirectAccessToStaticMethod, IndirectAccessToStaticType, InheritedFieldHidesEnclosingName, InheritedIncompatibleReturnType, InheritedMethodHidesEnclosingName, InheritedMethodReducesVisibility, InheritedTypeHidesEnclosingName, InitializerMustCompleteNormally, InstanceFieldDuringConstructorInvocation, InstanceMethodDuringConstructorInvocation, InterfaceAmbiguous, InterfaceCannotHaveConstructors, InterfaceCannotHaveInitializers, InterfaceInheritedNameHidesEnclosingName, InterfaceInternalNameProvided, InterfaceNotFound, InterfaceNotVisible, Internal, InternalTypeNameProvided, InvalidAnnotationMemberType, InvalidBinary, InvalidBreak, InvalidCatchBlockSequence, InvalidCharacterConstant, InvalidClassInstantiation, InvalidContinue, InvalidDigit, InvalidEncoding, InvalidEscape, InvalidExplicitConstructorCall, InvalidExpressionAsStatement, InvalidFileNameForPackageAnnotations, InvalidFloat, InvalidHexa, InvalidHighSurrogate, InvalidInput, InvalidLowSurrogate, InvalidNullToSynchronized, InvalidOctal, InvalidOperator, InvalidParameterizedExceptionType, InvalidParenthesizedExpression, InvalidTypeExpression, InvalidTypeForCollection, InvalidTypeForCollectionTarget14, InvalidTypeForStaticImport, InvalidTypeToSynchronized, InvalidTypeVariableExceptionType, InvalidUnaryExpression, InvalidUnicodeEscape, InvalidUnionTypeReferenceSequence, InvalidUsageOfAnnotationDeclarations, InvalidUsageOfAnnotations, InvalidUsageOfEnumDeclarations, InvalidUsageOfForeachStatements, InvalidUsageOfStaticImports, InvalidUsageOfTypeArguments, InvalidUsageOfTypeParameters, InvalidUsageOfTypeParametersForAnnotationDeclaration, InvalidUsageOfTypeParametersForEnumDeclaration, InvalidUsageOfVarargs, InvalidUsageOfWildcard, InvalidVoidExpression, IsClassPathCorrect, Javadoc, JavadocAmbiguousConstructor, JavadocAmbiguousField, JavadocAmbiguousMethod, JavadocAmbiguousMethodReference, JavadocAmbiguousType, JavadocDuplicateParamName, JavadocDuplicateReturnTag, JavadocDuplicateTag, JavadocDuplicateThrowsClassName, JavadocEmptyReturnTag, JavadocGenericConstructorTypeArgumentMismatch, JavadocGenericMethodTypeArgumentMismatch, JavadocHiddenReference, JavadocIncorrectArityForParameterizedConstructor, JavadocIncorrectArityForParameterizedMethod, JavadocInheritedFieldHidesEnclosingName, JavadocInheritedMethodHidesEnclosingName, JavadocInheritedNameHidesEnclosingTypeName, JavadocInternalTypeNameProvided, JavadocInvalidMemberTypeQualification, JavadocInvalidParamName, JavadocInvalidParamTagName, JavadocInvalidParamTagTypeParameter, JavadocInvalidSeeArgs, JavadocInvalidSeeHref, JavadocInvalidSeeReference, JavadocInvalidSeeUrlReference, JavadocInvalidTag, JavadocInvalidThrowsClass, JavadocInvalidThrowsClassName, JavadocInvalidValueReference, JavadocMalformedSeeReference, JavadocMessagePrefix, JavadocMissing, JavadocMissingHashCharacter, JavadocMissingIdentifier, JavadocMissingParamName, JavadocMissingParamTag, JavadocMissingReturnTag, JavadocMissingSeeReference, JavadocMissingTagDescription, JavadocMissingThrowsClassName, JavadocMissingThrowsTag, JavadocNoMessageSendOnArrayType, JavadocNoMessageSendOnBaseType, JavadocNonGenericConstructor, JavadocNonGenericMethod, JavadocNonStaticTypeFromStaticInvocation, JavadocNotVisibleConstructor, JavadocNotVisibleField, JavadocNotVisibleMethod, JavadocNotVisibleType, JavadocParameterizedConstructorArgumentTypeMismatch, JavadocParameterizedMethodArgumentTypeMismatch, JavadocParameterMismatch, JavadocTypeArgumentsForRawGenericConstructor, JavadocTypeArgumentsForRawGenericMethod, JavadocUndefinedConstructor, JavadocUndefinedField, JavadocUndefinedMethod, JavadocUndefinedType, JavadocUnexpectedTag, JavadocUnexpectedText, JavadocUnterminatedInlineTag, JavadocUsingDeprecatedConstructor, JavadocUsingDeprecatedField, JavadocUsingDeprecatedMethod, JavadocUsingDeprecatedType, LocalVariableCannotBeNull, LocalVariableCanOnlyBeNull, LocalVariableHidingField, LocalVariableHidingLocalVariable, LocalVariableIsNeverUsed, LocalVariableMayBeNull, MaskedCatch, MethodButWithConstructorName, MethodCanBePotentiallyStatic, MethodCanBeStatic, MethodMissingDeprecatedAnnotation, MethodMustOverride, MethodMustOverrideOrImplement, MethodNameClash, MethodReducesVisibility, MethodRelated, MethodRequiresBody, MethodReturnsVoid, MethodVarargsArgumentNeedCast, MissingArgumentsForParameterizedMemberType, MissingEnclosingInstance, MissingEnclosingInstanceForConstructorCall, MissingEnumConstantCase, MissingOverrideAnnotation, MissingOverrideAnnotationForInterfaceMethodImplementation, MissingReturnType, MissingSemiColon, MissingSerialVersion, MissingSynchronizedModifierInInheritedMethod, MissingTypeInConstructor, MissingTypeInMethod, MissingValueForAnnotationMember, MultiCatchNotBelow17, MustDefineEitherDimensionExpressionsOrInitializer, MustSpecifyPackage, NativeMethodsCannotBeStrictfp, NeedToEmulateConstructorAccess, NeedToEmulateFieldReadAccess, NeedToEmulateFieldWriteAccess, NeedToEmulateMethodAccess, NoAdditionalBoundAfterTypeVariable, NoFieldOnBaseType, NoImplicitStringConversionForCharArrayExpression, NoMessageSendOnArrayType, NoMessageSendOnBaseType, NonBlankFinalLocalAssignment, NonConstantExpression, NonExternalizedStringLiteral, NonGenericConstructor, NonGenericMethod, NonGenericType, NonNullLocalVariableComparisonYieldsFalse, NonStaticAccessToStaticField, NonStaticAccessToStaticMethod, NonStaticContextForEnumMemberType, NonStaticFieldFromStaticInvocation, NonStaticTypeFromStaticInvocation, NotVisibleConstructor, NotVisibleConstructorInDefaultConstructor, NotVisibleConstructorInImplicitConstructorCall, NotVisibleField, NotVisibleMethod, NotVisibleType, NullLocalVariableComparisonYieldsFalse, NullLocalVariableInstanceofYieldsFalse, NullLocalVariableReference, NullSourceString, NumericValueOutOfRange, ObjectCannotBeGeneric, ObjectCannotHaveSuperTypes, ObjectHasNoSuperclass, ObjectMustBeClass, OuterLocalMustBeFinal, OverridingDeprecatedMethod, OverridingMethodWithoutSuperInvocation, OverridingNonVisibleMethod, PackageCollidesWithType, PackageIsNotExpectedPackage, ParameterAssignment, ParameterizedConstructorArgumentTypeMismatch, ParameterizedMethodArgumentTypeMismatch, ParameterMismatch, ParsingError, ParsingErrorDeleteToken, ParsingErrorDeleteTokens, ParsingErrorInsertToComplete, ParsingErrorInsertToCompletePhrase, ParsingErrorInsertToCompleteScope, ParsingErrorInsertTokenAfter, ParsingErrorInsertTokenBefore, ParsingErrorInvalidToken, ParsingErrorMergeTokens, ParsingErrorMisplacedConstruct, ParsingErrorNoSuggestion, ParsingErrorNoSuggestionForTokens, ParsingErrorOnKeyword, ParsingErrorOnKeywordNoSuggestion, ParsingErrorReplaceTokens, ParsingErrorUnexpectedEOF, PolymorphicMethodNotBelow17, PossibleAccidentalBooleanAssignment, PotentialHeapPollutionFromVararg, PotentialNullLocalVariableReference, PublicClassMustMatchFileName, RawMemberTypeCannotBeParameterized, RawTypeReference, RecursiveConstructorInvocation, RedefinedArgument, RedefinedLocal, RedundantLocalVariableNullAssignment, RedundantNullCheckOnNonNullLocalVariable, RedundantNullCheckOnNullLocalVariable, RedundantSpecificationOfTypeArguments, RedundantSuperinterface, ReferenceToForwardField, ReferenceToForwardTypeVariable, ResourceHasToImplementAutoCloseable, ReturnTypeAmbiguous, ReturnTypeCannotBeVoidArray, ReturnTypeInheritedNameHidesEnclosingName, ReturnTypeInternalNameProvided, ReturnTypeNotFound, ReturnTypeNotVisible, SafeVarargsOnFixedArityMethod, SafeVarargsOnNonFinalInstanceMethod, ShouldImplementHashcode, ShouldReturnValue, StaticInheritedMethodConflicts, StaticMemberOfParameterizedType, StaticMethodRequested, StringConstantIsExceedingUtf8Limit, SuperclassAmbiguous, SuperclassInheritedNameHidesEnclosingName, SuperclassInternalNameProvided, SuperclassMustBeAClass, SuperclassNotFound, SuperclassNotVisible, SuperfluousSemicolon, SuperInterfaceMustBeAnInterface, SuperInterfacesCollide, SuperTypeUsingWildcard, SwitchOnStringsNotBelow17, Syntax, Task, ThisInStaticContext, ThisSuperDuringConstructorInvocation, TooManyArgumentSlots, TooManyArrayDimensions, TooManyBytesForStringConstant, TooManyConstantsInConstantPool, TooManyFields, TooManyLocalVariableSlots, TooManyMethods, TooManyParametersForSyntheticMethod, TooManySyntheticArgumentSlots, TypeArgumentMismatch, TypeArgumentsForRawGenericConstructor, TypeArgumentsForRawGenericMethod, TypeCollidesWithPackage, TypeHidingType, TypeHidingTypeParameterFromMethod, TypeHidingTypeParameterFromType, TypeMismatch, TypeMissingDeprecatedAnnotation, TypeParameterHidingType, TypeRelated, UnboxingConversion, Unclassified, UndefinedAnnotationMember, UndefinedConstructor, UndefinedConstructorInDefaultConstructor, UndefinedConstructorInImplicitConstructorCall, UndefinedField, UndefinedLabel, UndefinedMethod, UndefinedName, UndefinedType, UndefinedTypeVariable, UnderscoresInLiteralsNotBelow17, UndocumentedEmptyBlock, UnexpectedStaticModifierForField, UnexpectedStaticModifierForMethod, UnhandledException, UnhandledExceptionInDefaultConstructor, UnhandledExceptionInImplicitConstructorCall, UnhandledExceptionOnAutoClose, UnhandledWarningToken, UninitializedBlankFinalField, UninitializedLocalVariable, UnmatchedBracket, UnnecessaryArgumentCast, UnnecessaryCast, UnnecessaryElse, UnnecessaryInstanceof, UnnecessaryNLSTag, UnqualifiedFieldAccess, UnreachableCatch, UnresolvedVariable, UnsafeGenericArrayForVarargs, UnsafeGenericCast, UnsafeRawConstructorInvocation, UnsafeRawFieldAssignment, UnsafeRawGenericConstructorInvocation, UnsafeRawGenericMethodInvocation, UnsafeRawMethodInvocation, UnsafeReturnTypeOverride, UnsafeTypeConversion, UnterminatedComment, UnterminatedString, UnusedConstructorDeclaredThrownException, UnusedImport, UnusedLabel, UnusedMethodDeclaredThrownException, UnusedObjectAllocation, UnusedPrivateConstructor, UnusedPrivateField, UnusedPrivateMethod, UnusedPrivateType, UnusedTypeArgumentsForConstructorInvocation, UnusedTypeArgumentsForMethodInvocation, UnusedWarningToken, UseAssertAsAnIdentifier, UseEnumAsAnIdentifier, UsingDeprecatedConstructor, UsingDeprecatedField, UsingDeprecatedMethod, UsingDeprecatedType, VarargsConflict, VariableTypeCannotBeVoid, VariableTypeCannotBeVoidArray, VoidMethodReturnsValue, WildcardConstructorInvocation, WildcardFieldAssignment, WildcardMethodInvocation
 
构造方法摘要
CategorizedProblem()
           
 
方法摘要
abstract  int getCategoryID()
          Returns an integer identifying the category of this problem.
 String[] getExtraMarkerAttributeNames()
          Returns the names of the extra marker attributes associated to this problem when persisted into a marker by the JavaBuilder.
 Object[] getExtraMarkerAttributeValues()
          Returns the respective values for the extra marker attributes associated to this problem when persisted into a marker by the JavaBuilder.
abstract  String getMarkerType()
          Returns the marker type associated to this problem, if it gets persisted into a marker by the JavaBuilder Standard Java problems are associated to marker type "org.eclipse.jdt.core.problem").
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
从接口 org.eclipse.jdt.core.compiler.IProblem 继承的方法
getArguments, getID, getMessage, getOriginatingFileName, getSourceEnd, getSourceLineNumber, getSourceStart, isError, isWarning, setSourceEnd, setSourceLineNumber, setSourceStart
 

字段详细信息

CAT_UNSPECIFIED

public static final int CAT_UNSPECIFIED
List of standard category IDs used by Java problems, more categories will be added in the future.

另请参见:
常量字段值

CAT_BUILDPATH

public static final int CAT_BUILDPATH
Category for problems related to buildpath

另请参见:
常量字段值

CAT_SYNTAX

public static final int CAT_SYNTAX
Category for fatal problems related to syntax

另请参见:
常量字段值

CAT_IMPORT

public static final int CAT_IMPORT
Category for fatal problems in import statements

另请参见:
常量字段值

CAT_TYPE

public static final int CAT_TYPE
Category for fatal problems related to types, could be addressed by some type change

另请参见:
常量字段值

CAT_MEMBER

public static final int CAT_MEMBER
Category for fatal problems related to type members, could be addressed by some field or method change

另请参见:
常量字段值

CAT_INTERNAL

public static final int CAT_INTERNAL
Category for fatal problems which could not be addressed by external changes, but require an edit to be addressed

另请参见:
常量字段值

CAT_JAVADOC

public static final int CAT_JAVADOC
Category for optional problems in Javadoc

另请参见:
常量字段值

CAT_CODE_STYLE

public static final int CAT_CODE_STYLE
Category for optional problems related to coding style practices

另请参见:
常量字段值

CAT_POTENTIAL_PROGRAMMING_PROBLEM

public static final int CAT_POTENTIAL_PROGRAMMING_PROBLEM
Category for optional problems related to potential programming flaws

另请参见:
常量字段值

CAT_NAME_SHADOWING_CONFLICT

public static final int CAT_NAME_SHADOWING_CONFLICT
Category for optional problems related to naming conflicts

另请参见:
常量字段值

CAT_DEPRECATION

public static final int CAT_DEPRECATION
Category for optional problems related to deprecation

另请参见:
常量字段值

CAT_UNNECESSARY_CODE

public static final int CAT_UNNECESSARY_CODE
Category for optional problems related to unnecessary code

另请参见:
常量字段值

CAT_UNCHECKED_RAW

public static final int CAT_UNCHECKED_RAW
Category for optional problems related to type safety in generics

另请参见:
常量字段值

CAT_NLS

public static final int CAT_NLS
Category for optional problems related to internationalization of String literals

另请参见:
常量字段值

CAT_RESTRICTION

public static final int CAT_RESTRICTION
Category for optional problems related to access restrictions

另请参见:
常量字段值
构造方法详细信息

CategorizedProblem

public CategorizedProblem()
方法详细信息

getCategoryID

public abstract int getCategoryID()
Returns an integer identifying the category of this problem. Categories, like problem IDs are defined in the context of some marker type. Custom implementations of CategorizedProblem may choose arbitrary values for problem/category IDs, as long as they are associated with a different marker type. Standard Java problem markers (i.e. marker type is "org.eclipse.jdt.core.problem") carry an attribute "categoryId" persisting the originating problem category ID as defined by this method).

返回:
id - an integer identifying the category of this problem

getMarkerType

public abstract String getMarkerType()
Returns the marker type associated to this problem, if it gets persisted into a marker by the JavaBuilder Standard Java problems are associated to marker type "org.eclipse.jdt.core.problem"). Note: problem markers are expected to extend "org.eclipse.core.resources.problemmarker" marker type.

返回:
the type of the marker which would be associated to the problem

getExtraMarkerAttributeNames

public String[] getExtraMarkerAttributeNames()
Returns the names of the extra marker attributes associated to this problem when persisted into a marker by the JavaBuilder. Extra attributes are only optional, and are allowing client customization of generated markers. By default, no EXTRA attributes is persisted, and a categorized problem only persists the following attributes: The names must be eligible for marker creation, as defined by IMarker#setAttributes(String[], Object[]), and there must be as many names as values according to getExtraMarkerAttributeValues(). Note that extra marker attributes will be inserted after default ones (as described in getMarkerType(), and thus could be used to override defaults.

返回:
the names of the corresponding marker attributes

getExtraMarkerAttributeValues

public Object[] getExtraMarkerAttributeValues()
Returns the respective values for the extra marker attributes associated to this problem when persisted into a marker by the JavaBuilder. Each value must correspond to a matching attribute name, as defined by getExtraMarkerAttributeNames(). The values must be eligible for marker creation, as defined by IMarker#setAttributes(String[], Object[])}.

返回:
the values of the corresponding extra marker attributes


Copyright © 2013. All Rights Reserved.