1 /*******************************************************************************
2 * Copyright (c) 2000, 2004 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 * IBM Corporation - added the following constants
11 * NonStaticAccessToStaticField
12 * NonStaticAccessToStaticMethod
14 * ExpressionShouldBeAVariable
15 * AssignmentHasNoEffect
16 * IBM Corporation - added the following constants
17 * TooManySyntheticArgumentSlots
18 * TooManyArrayDimensions
19 * TooManyBytesForStringConstant
22 * NonBlankFinalLocalAssignment
23 * ObjectCannotHaveSuperTypes
25 * InvalidParenthesizedExpression
26 * EnclosingInstanceInConstructorCall
27 * BytecodeExceeds64KLimitForConstructor
28 * IncompatibleReturnTypeForNonInheritedInterfaceMethod
30 * UnusedPrivateConstructor
33 * IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod
34 * InvalidExplicitConstructorCall
35 * IBM Corporation - added the following constants
36 * PossibleAccidentalBooleanAssignment
37 * SuperfluousSemicolon
38 * IndirectAccessToStaticField
39 * IndirectAccessToStaticMethod
40 * IndirectAccessToStaticType
41 * BooleanMethodThrowingException
43 * UnnecessaryArgumentCast
44 * UnnecessaryInstanceof
45 * FinallyMustCompleteNormally
46 * UnusedMethodDeclaredThrownException
47 * UnusedConstructorDeclaredThrownException
48 * InvalidCatchBlockSequence
49 * UnqualifiedFieldAccess
50 * IBM Corporation - added the following constants
52 * JavadocUnexpectedTag
53 * JavadocMissingParamTag
54 * JavadocMissingParamName
55 * JavadocDuplicateParamName
56 * JavadocInvalidParamName
57 * JavadocMissingReturnTag
58 * JavadocDuplicateReturnTag
59 * JavadocMissingThrowsTag
60 * JavadocMissingThrowsClassName
61 * JavadocInvalidThrowsClass
62 * JavadocDuplicateThrowsClassName
63 * JavadocInvalidThrowsClassName
64 * JavadocMissingSeeReference
65 * JavadocInvalidSeeReference
66 * JavadocInvalidSeeHref
67 * JavadocInvalidSeeArgs
70 * JavadocMessagePrefix
71 * EmptyControlFlowStatement
72 * IBM Corporation - added the following constants
73 * IllegalUsageOfQualifiedTypeReference
75 ****************************************************************************/
76 package org.eclipse.jdt.core.compiler;
78 import org.eclipse.jdt.internal.compiler.lookup.ProblemReasons;
81 * Description of a Java problem, as detected by the compiler or some of the underlying
82 * technology reusing the compiler.
83 * A problem provides access to:
85 * <li> its location (originating source file name, source position, line number), </li>
86 * <li> its message description and a predicate to check its severity (warning or error). </li>
87 * <li> its ID : an number identifying the very nature of this problem. All possible IDs are listed
88 * as constants on this interface. </li>
91 * Note: the compiler produces IProblems internally, which are turned into markers by the JavaBuilder
92 * so as to persist problem descriptions. This explains why there is no API allowing to reach IProblem detected
93 * when compiling. However, the Java problem markers carry equivalent information to IProblem, in particular
94 * their ID (attribute "id") is set to one of the IDs defined on this interface.
98 public interface IProblem {
101 * Answer back the original arguments recorded into the problem.
102 * @return the original arguments recorded into the problem
104 String[] getArguments();
107 * Returns the problem id
109 * @return the problem id
114 * Answer a localized, human-readable message string which describes the problem.
116 * @return a localized, human-readable message string which describes the problem
121 * Answer the file name in which the problem was found.
123 * @return the file name in which the problem was found
125 char[] getOriginatingFileName();
128 * Answer the end position of the problem (inclusive), or -1 if unknown.
130 * @return the end position of the problem (inclusive), or -1 if unknown
135 * Answer the line number in source where the problem begins.
137 * @return the line number in source where the problem begins
139 int getSourceLineNumber();
142 * Answer the start position of the problem (inclusive), or -1 if unknown.
144 * @return the start position of the problem (inclusive), or -1 if unknown
146 int getSourceStart();
149 * Checks the severity to see if the Error bit is set.
151 * @return true if the Error bit is set for the severity, false otherwise
156 * Checks the severity to see if the Error bit is not set.
158 * @return true if the Error bit is not set for the severity, false otherwise
163 * Set the end position of the problem (inclusive), or -1 if unknown.
164 * Used for shifting problem positions.
166 * @param sourceEnd the given end position
168 void setSourceEnd(int sourceEnd);
171 * Set the line number in source where the problem begins.
173 * @param lineNumber the given line number
175 void setSourceLineNumber(int lineNumber);
178 * Set the start position of the problem (inclusive), or -1 if unknown.
179 * Used for shifting problem positions.
181 * @param sourceStart the given start position
183 void setSourceStart(int sourceStart);
187 * The high bits of a problem ID contains information about the category of a problem.
188 * For example, (problemID & TypeRelated) != 0, indicates that this problem is type related.
190 * A problem category can help to implement custom problem filters. Indeed, when numerous problems
191 * are listed, focusing on import related problems first might be relevant.
193 * When a problem is tagged as Internal, it means that no change other than a local source code change
194 * can fix the corresponding problem.
196 int TypeRelated = 0x01000000;
197 int FieldRelated = 0x02000000;
198 int MethodRelated = 0x04000000;
199 int ConstructorRelated = 0x08000000;
200 int ImportRelated = 0x10000000;
201 int Internal = 0x20000000;
202 int Syntax = 0x40000000;
206 int Javadoc = 0x80000000;
209 * Mask to use in order to filter out the category portion of the problem ID.
211 int IgnoreCategoriesMask = 0xFFFFFF;
214 * Below are listed all available problem IDs. Note that this list could be augmented in the future,
215 * as new features are added to the Java core implementation.
219 * ID reserved for referencing an internal error inside the JavaCore implementation which
220 * may be surfaced as a problem associated with the compilation unit which caused it to occur.
222 int Unclassified = 0;
225 * General type related problems
227 int ObjectHasNoSuperclass = TypeRelated + 1;
228 int UndefinedType = TypeRelated + 2;
229 int NotVisibleType = TypeRelated + 3;
230 int AmbiguousType = TypeRelated + 4;
231 int UsingDeprecatedType = TypeRelated + 5;
232 int InternalTypeNameProvided = TypeRelated + 6;
234 int UnusedPrivateType = Internal + TypeRelated + 7;
236 int IncompatibleTypesInEqualityOperator = TypeRelated + 15;
237 int IncompatibleTypesInConditionalOperator = TypeRelated + 16;
238 int TypeMismatch = TypeRelated + 17;
240 int IndirectAccessToStaticType = Internal + TypeRelated + 18;
243 * Inner types related problems
245 int MissingEnclosingInstanceForConstructorCall = TypeRelated + 20;
246 int MissingEnclosingInstance = TypeRelated + 21;
247 int IncorrectEnclosingInstanceReference = TypeRelated + 22;
248 int IllegalEnclosingInstanceSpecification = TypeRelated + 23;
249 int CannotDefineStaticInitializerInLocalType = Internal + 24;
250 int OuterLocalMustBeFinal = Internal + 25;
251 int CannotDefineInterfaceInLocalType = Internal + 26;
252 int IllegalPrimitiveOrArrayTypeForEnclosingInstance = TypeRelated + 27;
254 int EnclosingInstanceInConstructorCall = Internal + 28;
255 int AnonymousClassCannotExtendFinalClass = TypeRelated + 29;
258 int UndefinedName = 50;
259 int UninitializedLocalVariable = Internal + 51;
260 int VariableTypeCannotBeVoid = Internal + 52;
261 int VariableTypeCannotBeVoidArray = Internal + 53;
262 int CannotAllocateVoidArray = Internal + 54;
264 int RedefinedLocal = Internal + 55;
265 int RedefinedArgument = Internal + 56;
266 // final local variables
267 int DuplicateFinalLocalInitialization = Internal + 57;
269 int NonBlankFinalLocalAssignment = Internal + 58;
271 int FinalOuterLocalAssignment = Internal + 60;
272 int LocalVariableIsNeverUsed = Internal + 61;
273 int ArgumentIsNeverUsed = Internal + 62;
274 int BytecodeExceeds64KLimit = Internal + 63;
275 int BytecodeExceeds64KLimitForClinit = Internal + 64;
276 int TooManyArgumentSlots = Internal + 65;
277 int TooManyLocalVariableSlots = Internal + 66;
279 int TooManySyntheticArgumentSlots = Internal + 67;
281 int TooManyArrayDimensions = Internal + 68;
283 int BytecodeExceeds64KLimitForConstructor = Internal + 69;
286 int UndefinedField = FieldRelated + 70;
287 int NotVisibleField = FieldRelated + 71;
288 int AmbiguousField = FieldRelated + 72;
289 int UsingDeprecatedField = FieldRelated + 73;
290 int NonStaticFieldFromStaticInvocation = FieldRelated + 74;
291 int ReferenceToForwardField = FieldRelated + Internal + 75;
293 int NonStaticAccessToStaticField = Internal + FieldRelated + 76;
295 int UnusedPrivateField = Internal + FieldRelated + 77;
297 int IndirectAccessToStaticField = Internal + FieldRelated + 78;
299 int UnqualifiedFieldAccess = Internal + FieldRelated + 79;
301 // blank final fields
302 int FinalFieldAssignment = FieldRelated + 80;
303 int UninitializedBlankFinalField = FieldRelated + 81;
304 int DuplicateBlankFinalFieldInitialization = FieldRelated + 82;
308 int LocalVariableHidingLocalVariable = Internal + 90;
310 int LocalVariableHidingField = Internal + FieldRelated + 91;
312 int FieldHidingLocalVariable = Internal + FieldRelated + 92;
314 int FieldHidingField = Internal + FieldRelated + 93;
316 int ArgumentHidingLocalVariable = Internal + 94;
318 int ArgumentHidingField = Internal + 95;
320 int MissingSerialVersion = Internal + 96;
323 int UndefinedMethod = MethodRelated + 100;
324 int NotVisibleMethod = MethodRelated + 101;
325 int AmbiguousMethod = MethodRelated + 102;
326 int UsingDeprecatedMethod = MethodRelated + 103;
327 int DirectInvocationOfAbstractMethod = MethodRelated + 104;
328 int VoidMethodReturnsValue = MethodRelated + 105;
329 int MethodReturnsVoid = MethodRelated + 106;
330 int MethodRequiresBody = Internal + MethodRelated + 107;
331 int ShouldReturnValue = Internal + MethodRelated + 108;
332 int MethodButWithConstructorName = MethodRelated + 110;
333 int MissingReturnType = TypeRelated + 111;
334 int BodyForNativeMethod = Internal + MethodRelated + 112;
335 int BodyForAbstractMethod = Internal + MethodRelated + 113;
336 int NoMessageSendOnBaseType = MethodRelated + 114;
337 int ParameterMismatch = MethodRelated + 115;
338 int NoMessageSendOnArrayType = MethodRelated + 116;
340 int NonStaticAccessToStaticMethod = Internal + MethodRelated + 117;
342 int UnusedPrivateMethod = Internal + MethodRelated + 118;
344 int IndirectAccessToStaticMethod = Internal + MethodRelated + 119;
347 int UndefinedConstructor = ConstructorRelated + 130;
348 int NotVisibleConstructor = ConstructorRelated + 131;
349 int AmbiguousConstructor = ConstructorRelated + 132;
350 int UsingDeprecatedConstructor = ConstructorRelated + 133;
352 int UnusedPrivateConstructor = Internal + MethodRelated + 134;
353 // explicit constructor calls
354 int InstanceFieldDuringConstructorInvocation = ConstructorRelated + 135;
355 int InstanceMethodDuringConstructorInvocation = ConstructorRelated + 136;
356 int RecursiveConstructorInvocation = ConstructorRelated + 137;
357 int ThisSuperDuringConstructorInvocation = ConstructorRelated + 138;
359 int InvalidExplicitConstructorCall = ConstructorRelated + Syntax + 139;
360 // implicit constructor calls
361 int UndefinedConstructorInDefaultConstructor = ConstructorRelated + 140;
362 int NotVisibleConstructorInDefaultConstructor = ConstructorRelated + 141;
363 int AmbiguousConstructorInDefaultConstructor = ConstructorRelated + 142;
364 int UndefinedConstructorInImplicitConstructorCall = ConstructorRelated + 143;
365 int NotVisibleConstructorInImplicitConstructorCall = ConstructorRelated + 144;
366 int AmbiguousConstructorInImplicitConstructorCall = ConstructorRelated + 145;
367 int UnhandledExceptionInDefaultConstructor = TypeRelated + 146;
368 int UnhandledExceptionInImplicitConstructorCall = TypeRelated + 147;
371 int ArrayReferenceRequired = Internal + 150;
372 int NoImplicitStringConversionForCharArrayExpression = Internal + 151;
373 // constant expressions
374 int StringConstantIsExceedingUtf8Limit = Internal + 152;
375 int NonConstantExpression = 153;
376 int NumericValueOutOfRange = Internal + 154;
378 int IllegalCast = TypeRelated + 156;
380 int InvalidClassInstantiation = TypeRelated + 157;
381 int CannotDefineDimensionExpressionsWithInit = Internal + 158;
382 int MustDefineEitherDimensionExpressionsOrInitializer = Internal + 159;
384 int InvalidOperator = Internal + 160;
386 int CodeCannotBeReached = Internal + 161;
387 int CannotReturnInInitializer = Internal + 162;
388 int InitializerMustCompleteNormally = Internal + 163;
390 int InvalidVoidExpression = Internal + 164;
392 int MaskedCatch = TypeRelated + 165;
393 int DuplicateDefaultCase = 166;
394 int UnreachableCatch = TypeRelated + MethodRelated + 167;
395 int UnhandledException = TypeRelated + 168;
397 int IncorrectSwitchType = TypeRelated + 169;
398 int DuplicateCase = FieldRelated + 170;
400 int DuplicateLabel = Internal + 171;
401 int InvalidBreak = Internal + 172;
402 int InvalidContinue = Internal + 173;
403 int UndefinedLabel = Internal + 174;
405 int InvalidTypeToSynchronized = Internal + 175;
406 int InvalidNullToSynchronized = Internal + 176;
408 int CannotThrowNull = Internal + 177;
411 int AssignmentHasNoEffect = Internal + 178;
413 int PossibleAccidentalBooleanAssignment = Internal + 179;
415 int SuperfluousSemicolon = Internal + 180;
417 int UnnecessaryCast = Internal + TypeRelated + 181;
419 int UnnecessaryArgumentCast = Internal + TypeRelated + 182;
421 int UnnecessaryInstanceof = Internal + TypeRelated + 183;
423 int FinallyMustCompleteNormally = Internal + 184;
425 int UnusedMethodDeclaredThrownException = Internal + 185;
427 int UnusedConstructorDeclaredThrownException = Internal + 186;
429 int InvalidCatchBlockSequence = Internal + TypeRelated + 187;
431 int EmptyControlFlowStatement = Internal + TypeRelated + 188;
433 int UnnecessaryElse = Internal + 189;
436 int NeedToEmulateFieldReadAccess = FieldRelated + 190;
437 int NeedToEmulateFieldWriteAccess = FieldRelated + 191;
438 int NeedToEmulateMethodAccess = MethodRelated + 192;
439 int NeedToEmulateConstructorAccess = MethodRelated + 193;
441 //inherited name hides enclosing name (sort of ambiguous)
442 int InheritedMethodHidesEnclosingName = MethodRelated + 195;
443 int InheritedFieldHidesEnclosingName = FieldRelated + 196;
444 int InheritedTypeHidesEnclosingName = TypeRelated + 197;
447 int IllegalUsageOfQualifiedTypeReference = Internal + Syntax + 198;
450 int ThisInStaticContext = Internal + 200;
451 int StaticMethodRequested = Internal + MethodRelated + 201;
452 int IllegalDimension = Internal + 202;
453 int InvalidTypeExpression = Internal + 203;
454 int ParsingError = Syntax + Internal + 204;
455 int ParsingErrorNoSuggestion = Syntax + Internal + 205;
456 int InvalidUnaryExpression = Syntax + Internal + 206;
459 int InterfaceCannotHaveConstructors = Syntax + Internal + 207;
460 int ArrayConstantsOnlyInArrayInitializers = Syntax + Internal + 208;
461 int ParsingErrorOnKeyword = Syntax + Internal + 209;
462 int ParsingErrorOnKeywordNoSuggestion = Syntax + Internal + 210;
464 int UnmatchedBracket = Syntax + Internal + 220;
465 int NoFieldOnBaseType = FieldRelated + 221;
466 int InvalidExpressionAsStatement = Syntax + Internal + 222;
468 int ExpressionShouldBeAVariable = Syntax + Internal + 223;
470 int MissingSemiColon = Syntax + Internal + 224;
472 int InvalidParenthesizedExpression = Syntax + Internal + 225;
475 int ParsingErrorInsertTokenBefore = Syntax + Internal + 230;
477 int ParsingErrorInsertTokenAfter = Syntax + Internal + 231;
479 int ParsingErrorDeleteToken = Syntax + Internal + 232;
481 int ParsingErrorDeleteTokens = Syntax + Internal + 233;
483 int ParsingErrorMergeTokens = Syntax + Internal + 234;
485 int ParsingErrorInvalidToken = Syntax + Internal + 235;
487 int ParsingErrorMisplacedConstruct = Syntax + Internal + 236;
489 int ParsingErrorReplaceTokens = Syntax + Internal + 237;
491 int ParsingErrorNoSuggestionForTokens = Syntax + Internal + 238;
493 int ParsingErrorUnexpectedEOF = Syntax + Internal + 239;
495 int ParsingErrorInsertToComplete = Syntax + Internal + 240;
497 int ParsingErrorInsertToCompleteScope = Syntax + Internal + 241;
499 int ParsingErrorInsertToCompletePhrase = Syntax + Internal + 242;
502 int EndOfSource = Syntax + Internal + 250;
503 int InvalidHexa = Syntax + Internal + 251;
504 int InvalidOctal = Syntax + Internal + 252;
505 int InvalidCharacterConstant = Syntax + Internal + 253;
506 int InvalidEscape = Syntax + Internal + 254;
507 int InvalidInput = Syntax + Internal + 255;
508 int InvalidUnicodeEscape = Syntax + Internal + 256;
509 int InvalidFloat = Syntax + Internal + 257;
510 int NullSourceString = Syntax + Internal + 258;
511 int UnterminatedString = Syntax + Internal + 259;
512 int UnterminatedComment = Syntax + Internal + 260;
514 int InvalidDigit = Syntax + Internal + 262;
516 // type related problems
517 int InterfaceCannotHaveInitializers = TypeRelated + 300;
518 int DuplicateModifierForType = TypeRelated + 301;
519 int IllegalModifierForClass = TypeRelated + 302;
520 int IllegalModifierForInterface = TypeRelated + 303;
521 int IllegalModifierForMemberClass = TypeRelated + 304;
522 int IllegalModifierForMemberInterface = TypeRelated + 305;
523 int IllegalModifierForLocalClass = TypeRelated + 306;
525 int ForbiddenReference = TypeRelated + 307;
526 int IllegalModifierCombinationFinalAbstractForClass = TypeRelated + 308;
527 int IllegalVisibilityModifierForInterfaceMemberType = TypeRelated + 309;
528 int IllegalVisibilityModifierCombinationForMemberType = TypeRelated + 310;
529 int IllegalStaticModifierForMemberType = TypeRelated + 311;
530 int SuperclassMustBeAClass = TypeRelated + 312;
531 int ClassExtendFinalClass = TypeRelated + 313;
532 int DuplicateSuperInterface = TypeRelated + 314;
533 int SuperInterfaceMustBeAnInterface = TypeRelated + 315;
534 int HierarchyCircularitySelfReference = TypeRelated + 316;
535 int HierarchyCircularity = TypeRelated + 317;
536 int HidingEnclosingType = TypeRelated + 318;
537 int DuplicateNestedType = TypeRelated + 319;
538 int CannotThrowType = TypeRelated + 320;
539 int PackageCollidesWithType = TypeRelated + 321;
540 int TypeCollidesWithPackage = TypeRelated + 322;
541 int DuplicateTypes = TypeRelated + 323;
542 int IsClassPathCorrect = TypeRelated + 324;
543 int PublicClassMustMatchFileName = TypeRelated + 325;
544 int MustSpecifyPackage = 326;
545 int HierarchyHasProblems = TypeRelated + 327;
546 int PackageIsNotExpectedPackage = 328;
548 int ObjectCannotHaveSuperTypes = 329;
550 int ObjectMustBeClass = 330;
552 /** @deprecated - problem is no longer generated, UndefinedType is used instead */
553 int SuperclassNotFound = TypeRelated + 329 + ProblemReasons.NotFound; // TypeRelated + 330
554 /** @deprecated - problem is no longer generated, NotVisibleType is used instead */
555 int SuperclassNotVisible = TypeRelated + 329 + ProblemReasons.NotVisible; // TypeRelated + 331
556 /** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
557 int SuperclassAmbiguous = TypeRelated + 329 + ProblemReasons.Ambiguous; // TypeRelated + 332
558 /** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
559 int SuperclassInternalNameProvided = TypeRelated + 329 + ProblemReasons.InternalNameProvided; // TypeRelated + 333
560 /** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
561 int SuperclassInheritedNameHidesEnclosingName = TypeRelated + 329 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 334
563 /** @deprecated - problem is no longer generated, UndefinedType is used instead */
564 int InterfaceNotFound = TypeRelated + 334 + ProblemReasons.NotFound; // TypeRelated + 335
565 /** @deprecated - problem is no longer generated, NotVisibleType is used instead */
566 int InterfaceNotVisible = TypeRelated + 334 + ProblemReasons.NotVisible; // TypeRelated + 336
567 /** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
568 int InterfaceAmbiguous = TypeRelated + 334 + ProblemReasons.Ambiguous; // TypeRelated + 337
569 /** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
570 int InterfaceInternalNameProvided = TypeRelated + 334 + ProblemReasons.InternalNameProvided; // TypeRelated + 338
571 /** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
572 int InterfaceInheritedNameHidesEnclosingName = TypeRelated + 334 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 339
574 // field related problems
575 int DuplicateField = FieldRelated + 340;
576 int DuplicateModifierForField = FieldRelated + 341;
577 int IllegalModifierForField = FieldRelated + 342;
578 int IllegalModifierForInterfaceField = FieldRelated + 343;
579 int IllegalVisibilityModifierCombinationForField = FieldRelated + 344;
580 int IllegalModifierCombinationFinalVolatileForField = FieldRelated + 345;
581 int UnexpectedStaticModifierForField = FieldRelated + 346;
583 /** @deprecated - problem is no longer generated, UndefinedType is used instead */
584 int FieldTypeNotFound = FieldRelated + 349 + ProblemReasons.NotFound; // FieldRelated + 350
585 /** @deprecated - problem is no longer generated, NotVisibleType is used instead */
586 int FieldTypeNotVisible = FieldRelated + 349 + ProblemReasons.NotVisible; // FieldRelated + 351
587 /** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
588 int FieldTypeAmbiguous = FieldRelated + 349 + ProblemReasons.Ambiguous; // FieldRelated + 352
589 /** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
590 int FieldTypeInternalNameProvided = FieldRelated + 349 + ProblemReasons.InternalNameProvided; // FieldRelated + 353
591 /** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
592 int FieldTypeInheritedNameHidesEnclosingName = FieldRelated + 349 + ProblemReasons.InheritedNameHidesEnclosingName; // FieldRelated + 354
594 // method related problems
595 int DuplicateMethod = MethodRelated + 355;
596 int IllegalModifierForArgument = MethodRelated + 356;
597 int DuplicateModifierForMethod = MethodRelated + 357;
598 int IllegalModifierForMethod = MethodRelated + 358;
599 int IllegalModifierForInterfaceMethod = MethodRelated + 359;
600 int IllegalVisibilityModifierCombinationForMethod = MethodRelated + 360;
601 int UnexpectedStaticModifierForMethod = MethodRelated + 361;
602 int IllegalAbstractModifierCombinationForMethod = MethodRelated + 362;
603 int AbstractMethodInAbstractClass = MethodRelated + 363;
604 int ArgumentTypeCannotBeVoid = MethodRelated + 364;
605 int ArgumentTypeCannotBeVoidArray = MethodRelated + 365;
606 int ReturnTypeCannotBeVoidArray = MethodRelated + 366;
607 int NativeMethodsCannotBeStrictfp = MethodRelated + 367;
608 int DuplicateModifierForArgument = MethodRelated + 368;
610 /** @deprecated - problem is no longer generated, UndefinedType is used instead */
611 int ArgumentTypeNotFound = MethodRelated + 369 + ProblemReasons.NotFound; // MethodRelated + 370
612 /** @deprecated - problem is no longer generated, NotVisibleType is used instead */
613 int ArgumentTypeNotVisible = MethodRelated + 369 + ProblemReasons.NotVisible; // MethodRelated + 371
614 /** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
615 int ArgumentTypeAmbiguous = MethodRelated + 369 + ProblemReasons.Ambiguous; // MethodRelated + 372
616 /** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
617 int ArgumentTypeInternalNameProvided = MethodRelated + 369 + ProblemReasons.InternalNameProvided; // MethodRelated + 373
618 /** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
619 int ArgumentTypeInheritedNameHidesEnclosingName = MethodRelated + 369 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 374
621 /** @deprecated - problem is no longer generated, UndefinedType is used instead */
622 int ExceptionTypeNotFound = MethodRelated + 374 + ProblemReasons.NotFound; // MethodRelated + 375
623 /** @deprecated - problem is no longer generated, NotVisibleType is used instead */
624 int ExceptionTypeNotVisible = MethodRelated + 374 + ProblemReasons.NotVisible; // MethodRelated + 376
625 /** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
626 int ExceptionTypeAmbiguous = MethodRelated + 374 + ProblemReasons.Ambiguous; // MethodRelated + 377
627 /** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
628 int ExceptionTypeInternalNameProvided = MethodRelated + 374 + ProblemReasons.InternalNameProvided; // MethodRelated + 378
629 /** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
630 int ExceptionTypeInheritedNameHidesEnclosingName = MethodRelated + 374 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 379
632 /** @deprecated - problem is no longer generated, UndefinedType is used instead */
633 int ReturnTypeNotFound = MethodRelated + 379 + ProblemReasons.NotFound; // MethodRelated + 380
634 /** @deprecated - problem is no longer generated, NotVisibleType is used instead */
635 int ReturnTypeNotVisible = MethodRelated + 379 + ProblemReasons.NotVisible; // MethodRelated + 381
636 /** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
637 int ReturnTypeAmbiguous = MethodRelated + 379 + ProblemReasons.Ambiguous; // MethodRelated + 382
638 /** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
639 int ReturnTypeInternalNameProvided = MethodRelated + 379 + ProblemReasons.InternalNameProvided; // MethodRelated + 383
640 /** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
641 int ReturnTypeInheritedNameHidesEnclosingName = MethodRelated + 379 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 384
643 // import related problems
644 int ConflictingImport = ImportRelated + 385;
645 int DuplicateImport = ImportRelated + 386;
646 int CannotImportPackage = ImportRelated + 387;
647 int UnusedImport = ImportRelated + 388;
649 int ImportNotFound = ImportRelated + 389 + ProblemReasons.NotFound; // ImportRelated + 390
650 /** @deprecated - problem is no longer generated, NotVisibleType is used instead */
651 int ImportNotVisible = ImportRelated + 389 + ProblemReasons.NotVisible; // ImportRelated + 391
652 /** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
653 int ImportAmbiguous = ImportRelated + 389 + ProblemReasons.Ambiguous; // ImportRelated + 392
654 /** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
655 int ImportInternalNameProvided = ImportRelated + 389 + ProblemReasons.InternalNameProvided; // ImportRelated + 393
656 /** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
657 int ImportInheritedNameHidesEnclosingName = ImportRelated + 389 + ProblemReasons.InheritedNameHidesEnclosingName; // ImportRelated + 394
660 int InvalidTypeForStaticImport = ImportRelated + 391;
662 // local variable related problems
663 int DuplicateModifierForVariable = MethodRelated + 395;
664 int IllegalModifierForVariable = MethodRelated + 396;
666 int LocalVariableCannotBeNull = MethodRelated + 397;
668 int LocalVariableCanOnlyBeNull = MethodRelated + 398;
670 // method verifier problems
671 int AbstractMethodMustBeImplemented = MethodRelated + 400;
672 int FinalMethodCannotBeOverridden = MethodRelated + 401;
673 int IncompatibleExceptionInThrowsClause = MethodRelated + 402;
674 int IncompatibleExceptionInInheritedMethodThrowsClause = MethodRelated + 403;
675 int IncompatibleReturnType = MethodRelated + 404;
676 int InheritedMethodReducesVisibility = MethodRelated + 405;
677 int CannotOverrideAStaticMethodWithAnInstanceMethod = MethodRelated + 406;
678 int CannotHideAnInstanceMethodWithAStaticMethod = MethodRelated + 407;
679 int StaticInheritedMethodConflicts = MethodRelated + 408;
680 int MethodReducesVisibility = MethodRelated + 409;
681 int OverridingNonVisibleMethod = MethodRelated + 410;
682 int AbstractMethodCannotBeOverridden = MethodRelated + 411;
683 int OverridingDeprecatedMethod = MethodRelated + 412;
685 int IncompatibleReturnTypeForNonInheritedInterfaceMethod = MethodRelated + 413;
687 int IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod = MethodRelated + 414;
689 int IllegalVararg = MethodRelated + 415;
691 // code snippet support
692 int CodeSnippetMissingClass = Internal + 420;
693 int CodeSnippetMissingMethod = Internal + 421;
694 int NonExternalizedStringLiteral = Internal + 261;
695 int CannotUseSuperInCodeSnippet = Internal + 422;
698 int TooManyConstantsInConstantPool = Internal + 430;
700 int TooManyBytesForStringConstant = Internal + 431;
702 // static constraints
704 int TooManyFields = Internal + 432;
706 int TooManyMethods = Internal + 433;
710 int UseAssertAsAnIdentifier = Internal + 440;
713 int UseEnumAsAnIdentifier = Internal + 441;
717 int Task = Internal + 450;
721 int UndocumentedEmptyBlock = Internal + 460;
727 int JavadocUnexpectedTag = Javadoc + Internal + 470;
729 int JavadocMissingParamTag = Javadoc + Internal + 471;
731 int JavadocMissingParamName = Javadoc + Internal + 472;
733 int JavadocDuplicateParamName = Javadoc + Internal + 473;
735 int JavadocInvalidParamName = Javadoc + Internal + 474;
737 int JavadocMissingReturnTag = Javadoc + Internal + 475;
739 int JavadocDuplicateReturnTag = Javadoc + Internal + 476;
741 int JavadocMissingThrowsTag = Javadoc + Internal + 477;
743 int JavadocMissingThrowsClassName = Javadoc + Internal + 478;
745 int JavadocInvalidThrowsClass = Javadoc + Internal + 479;
747 int JavadocDuplicateThrowsClassName = Javadoc + Internal + 480;
749 int JavadocInvalidThrowsClassName = Javadoc + Internal + 481;
751 int JavadocMissingReference = Javadoc + Internal + 482;
753 int JavadocInvalidReference = Javadoc + Internal + 483;
755 int JavadocInvalidSeeHref = Javadoc + Internal + 484;
757 int JavadocInvalidSeeArgs = Javadoc + Internal + 485;
759 int JavadocMissing = Javadoc + Internal + 486;
761 int JavadocInvalidTag = Javadoc + Internal + 487;
763 * ID for field errors in Javadoc
766 int JavadocUndefinedField = Javadoc + Internal + 488;
768 int JavadocNotVisibleField = Javadoc + Internal + 489;
770 int JavadocAmbiguousField = Javadoc + Internal + 490;
772 int JavadocUsingDeprecatedField = Javadoc + Internal + 491;
774 * IDs for constructor errors in Javadoc
777 int JavadocUndefinedConstructor = Javadoc + Internal + 492;
779 int JavadocNotVisibleConstructor = Javadoc + Internal + 493;
781 int JavadocAmbiguousConstructor = Javadoc + Internal + 494;
783 int JavadocUsingDeprecatedConstructor = Javadoc + Internal + 495;
785 * IDs for method errors in Javadoc
788 int JavadocUndefinedMethod = Javadoc + Internal + 496;
790 int JavadocNotVisibleMethod = Javadoc + Internal + 497;
792 int JavadocAmbiguousMethod = Javadoc + Internal + 498;
794 int JavadocUsingDeprecatedMethod = Javadoc + Internal + 499;
796 int JavadocNoMessageSendOnBaseType = Javadoc + Internal + 500;
798 int JavadocParameterMismatch = Javadoc + Internal + 501;
800 int JavadocNoMessageSendOnArrayType = Javadoc + Internal + 502;
802 * IDs for type errors in Javadoc
805 int JavadocUndefinedType = Javadoc + Internal + 503;
807 int JavadocNotVisibleType = Javadoc + Internal + 504;
809 int JavadocAmbiguousType = Javadoc + Internal + 505;
811 int JavadocUsingDeprecatedType = Javadoc + Internal + 506;
813 int JavadocInternalTypeNameProvided = Javadoc + Internal + 507;
815 int JavadocInheritedMethodHidesEnclosingName = Javadoc + Internal + 508;
817 int JavadocInheritedFieldHidesEnclosingName = Javadoc + Internal + 509;
819 int JavadocInheritedNameHidesEnclosingTypeName = Javadoc + Internal + 510;
821 int JavadocAmbiguousMethodReference = Javadoc + Internal + 511;
823 int JavadocUnterminatedInlineTag = Javadoc + Internal + 512;
825 int JavadocMissingHashCharacter = Javadoc + Internal + 513;
827 int JavadocMalformedSeeReference = Javadoc + Internal + 514;
829 int JavadocEmptyReturnTag = Javadoc + Internal + 515;
831 int JavadocInvalidValueReference = Javadoc + Internal + 516;
833 int JavadocUnexpectedText = Javadoc + Internal + 517;
835 int JavadocInvalidParamTagName = Javadoc + Internal + 518;
837 int JavadocInvalidParamTagTypeParameter = Javadoc + Internal + 469;
839 int JavadocMessagePrefix = Internal + 519;
845 int DuplicateTypeVariable = Internal + 520;
847 int IllegalTypeVariableSuperReference = Internal + 521;
849 int TypeVariableReferenceFromStaticContext = Internal + 522;
851 int ObjectCannotBeGeneric = Internal + 523;
853 int NonGenericType = TypeRelated + 524;
855 int IncorrectArityForParameterizedType = TypeRelated + 525;
857 int TypeArgumentMismatch = TypeRelated + 526;
859 int DuplicateMethodErasure = TypeRelated + 527;
861 int ReferenceToForwardTypeVariable = TypeRelated + 528;
863 int BoundsMustBeAnInterface = TypeRelated + 529;
865 int UnsafeRawConstructorInvocation = TypeRelated + 530;
867 int UnsafeRawMethodInvocation = TypeRelated + 531;
869 int UnsafeRawConversion = TypeRelated + 532;
871 int InvalidTypeVariableExceptionType = TypeRelated + 533;
873 int InvalidParameterizedExceptionType = TypeRelated + 534;
875 int IllegalGenericArray = TypeRelated + 535;
877 int UnsafeRawFieldAssignment = TypeRelated + 536;
879 int FinalBoundForTypeVariable = TypeRelated + 537;
881 int UndefinedTypeVariable = Internal + 538;
883 int SuperInterfacesCollide = TypeRelated + 539;
885 int WildcardConstructorInvocation = TypeRelated + 540;
887 int WildcardMethodInvocation = TypeRelated + 541;
889 int WildcardFieldAssignment = TypeRelated + 542;
891 int GenericMethodTypeArgumentMismatch = TypeRelated + 543;
893 int GenericConstructorTypeArgumentMismatch = TypeRelated + 544;
895 int UnsafeGenericCast = TypeRelated + 545;
897 int IllegalInstanceofParameterizedType = Internal + 546;
899 int IllegalInstanceofTypeParameter = Internal + 547;
901 int NonGenericMethod = TypeRelated + 548;
903 int IncorrectArityForParameterizedMethod = TypeRelated + 549;
905 int ParameterizedMethodArgumentTypeMismatch = TypeRelated + 550;
907 int NonGenericConstructor = TypeRelated + 551;
909 int IncorrectArityForParameterizedConstructor = TypeRelated + 552;
911 int ParameterizedConstructorArgumentTypeMismatch = TypeRelated + 553;
913 int TypeArgumentsForRawGenericMethod = TypeRelated + 554;
915 int TypeArgumentsForRawGenericConstructor = TypeRelated + 555;
917 int SuperTypeUsingWildcard = TypeRelated + 556;
919 int GenericTypeCannotExtendThrowable = TypeRelated + 557;
921 int IllegalClassLiteralForTypeVariable = TypeRelated + 558;
923 int UnsafeReturnTypeOverride = MethodRelated + 559;
925 int MethodNameClash = MethodRelated + 560;
927 int RawMemberTypeCannotBeParameterized = TypeRelated + 561;
929 int MissingArgumentsForParameterizedMemberType = TypeRelated + 562;
931 int StaticMemberOfParameterizedType = TypeRelated + 563;
933 int BoundHasConflictingArguments = TypeRelated + 564;
935 int DuplicateParameterizedMethods = MethodRelated + 565;
941 int IncompatibleTypesInForeach = TypeRelated + 580;
943 int InvalidTypeForCollection = Internal + 581;
946 * 1.5 Syntax errors (when source level < 1.5)
949 int InvalidUsageOfTypeParameters = Syntax + Internal + 590;
951 int InvalidUsageOfStaticImports = Syntax + Internal + 591;
953 int InvalidUsageOfForeachStatements = Syntax + Internal + 592;
955 int InvalidUsageOfTypeArguments = Syntax + Internal + 593;
957 int InvalidUsageOfEnumDeclarations = Syntax + Internal + 594;
959 int InvalidUsageOfVarargs = Syntax + Internal + 595;
961 int InvalidUsageOfAnnotations = Syntax + Internal + 596;
963 int InvalidUsageOfAnnotationDeclarations = Syntax + Internal + 597;
969 int IllegalModifierForAnnotationMethod = MethodRelated + 600;
971 int IllegalExtendedDimensions = MethodRelated + 601;
973 int InvalidFileNameForPackageAnnotations = Syntax + Internal + 602;
975 int IllegalModifierForAnnotationType = TypeRelated + 603;
977 int IllegalModifierForAnnotationMemberType = TypeRelated + 604;
979 int InvalidAnnotationMemberType = TypeRelated + 605;
981 int AnnotationCircularitySelfReference = TypeRelated + 606;
983 int AnnotationCircularity = TypeRelated + 607;
985 int DuplicateAnnotation = TypeRelated + 608;
987 int MissingValueForAnnotationMember = TypeRelated + 609;
989 int DuplicateAnnotationMember = Internal + 610;
991 int UndefinedAnnotationMember = MethodRelated + 611;
993 int AnnotationValueMustBeClassLiteral = Internal + 612;
995 int AnnotationValueMustBeConstant = Internal + 613;
997 int AnnotationFieldNeedConstantInitialization = Internal + 614;
999 int IllegalModifierForAnnotationField = Internal + 615;
1001 int AnnotationCannotOverrideMethod = MethodRelated + 616;
1003 int AnnotationMembersCannotHaveParameters = Syntax + Internal + 617;
1005 int AnnotationMembersCannotHaveTypeParameters = Syntax + Internal + 618;
1007 int AnnotationTypeDeclarationCannotHaveSuperclass = Syntax + Internal + 619;
1009 int AnnotationTypeDeclarationCannotHaveSuperinterfaces = Syntax + Internal + 620;
1011 int DuplicateTargetInTargetAnnotation = Internal + 621;
1013 int DisallowedTargetForAnnotation = TypeRelated + 622;
1015 int MethodMustOverride = TypeRelated + 623;
1017 int AnnotationTypeDeclarationCannotHaveConstructor = Syntax + Internal + 624;
1020 * Corrupted binaries
1023 int CorruptedSignature = Internal + 700;
1029 int IllegalModifierForEnum = TypeRelated + 750;
1031 int IllegalModifierForEnumConstant = FieldRelated + 751;
1033 int IllegalModifierForLocalEnum = TypeRelated + 752;
1035 int IllegalModifierForMemberEnum = TypeRelated + 753;
1037 int CannotDeclareEnumSpecialMethod = MethodRelated + 754;
1039 int IllegalQualifiedEnumConstantLabel = FieldRelated + 755;
1041 int CannotExtendEnum = TypeRelated + 756;
1043 int CannotInvokeSuperConstructorInEnum = MethodRelated + 757;
1045 int EnumAbstractMethodMustBeImplemented = MethodRelated + 758;
1051 int IllegalExtendedDimensionsForVarArgs = Syntax + Internal + 800;
1053 int MethodVarargsArgumentNeedCast = MethodRelated + 801;
1055 int ConstructorVarargsArgumentNeedCast = ConstructorRelated + 802;