Makefile fixup
[org.ibex.tool.git] / src / org / eclipse / jdt / core / compiler / IProblem.java
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
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *     IBM Corporation - added the following constants
11  *                                                                 NonStaticAccessToStaticField
12  *                                                                 NonStaticAccessToStaticMethod
13  *                                                                 Task
14  *                                                                 ExpressionShouldBeAVariable
15  *                                                                 AssignmentHasNoEffect
16  *     IBM Corporation - added the following constants
17  *                                                                 TooManySyntheticArgumentSlots
18  *                                                                 TooManyArrayDimensions
19  *                                                                 TooManyBytesForStringConstant
20  *                                                                 TooManyMethods
21  *                                                                 TooManyFields
22  *                                                                 NonBlankFinalLocalAssignment
23  *                                                                 ObjectCannotHaveSuperTypes
24  *                                                                 MissingSemiColon
25  *                                                                 InvalidParenthesizedExpression
26  *                                                                 EnclosingInstanceInConstructorCall
27  *                                                                 BytecodeExceeds64KLimitForConstructor
28  *                                                                 IncompatibleReturnTypeForNonInheritedInterfaceMethod
29  *                                                                 UnusedPrivateMethod
30  *                                                                 UnusedPrivateConstructor
31  *                                                                 UnusedPrivateType
32  *                                                                 UnusedPrivateField
33  *                                                                 IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod
34  *                                                                 InvalidExplicitConstructorCall
35  *     IBM Corporation - added the following constants
36  *                                                                 PossibleAccidentalBooleanAssignment
37  *                                                                 SuperfluousSemicolon
38  *                                                                 IndirectAccessToStaticField
39  *                                                                 IndirectAccessToStaticMethod
40  *                                                                 IndirectAccessToStaticType
41  *                                                                 BooleanMethodThrowingException
42  *                                                                 UnnecessaryCast
43  *                                                                 UnnecessaryArgumentCast
44  *                                                                 UnnecessaryInstanceof
45  *                                                                 FinallyMustCompleteNormally
46  *                                                                 UnusedMethodDeclaredThrownException
47  *                                                                 UnusedConstructorDeclaredThrownException
48  *                                                                 InvalidCatchBlockSequence
49  *                                                                 UnqualifiedFieldAccess
50  *     IBM Corporation - added the following constants
51  *                                                                 Javadoc
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
68  *                                                                 JavadocMissing
69  *                                                                 JavadocInvalidTag
70  *                                                                 JavadocMessagePrefix
71  *                                                                 EmptyControlFlowStatement
72  ****************************************************************************/
73 package org.eclipse.jdt.core.compiler;
74  
75 import org.eclipse.jdt.internal.compiler.lookup.ProblemReasons;
76
77 /**
78  * Description of a Java problem, as detected by the compiler or some of the underlying
79  * technology reusing the compiler. 
80  * A problem provides access to:
81  * <ul>
82  * <li> its location (originating source file name, source position, line number), </li>
83  * <li> its message description and a predicate to check its severity (warning or error). </li>
84  * <li> its ID : an number identifying the very nature of this problem. All possible IDs are listed
85  * as constants on this interface. </li>
86  * </ul>
87  * 
88  * Note: the compiler produces IProblems internally, which are turned into markers by the JavaBuilder
89  * so as to persist problem descriptions. This explains why there is no API allowing to reach IProblem detected
90  * when compiling. However, the Java problem markers carry equivalent information to IProblem, in particular
91  * their ID (attribute "id") is set to one of the IDs defined on this interface.
92  * 
93  * @since 2.0
94  */
95 public interface IProblem { 
96         
97         /**
98          * Answer back the original arguments recorded into the problem.
99          * @return the original arguments recorded into the problem
100          */
101         String[] getArguments();
102
103         /**
104          * Returns the problem id
105          * 
106          * @return the problem id
107          */
108         int getID();
109
110         /**
111          * Answer a localized, human-readable message string which describes the problem.
112          * 
113          * @return a localized, human-readable message string which describes the problem
114          */
115         String getMessage();
116
117         /**
118          * Answer the file name in which the problem was found.
119          * 
120          * @return the file name in which the problem was found
121          */
122         char[] getOriginatingFileName();
123         
124         /**
125          * Answer the end position of the problem (inclusive), or -1 if unknown.
126          * 
127          * @return the end position of the problem (inclusive), or -1 if unknown
128          */
129         int getSourceEnd();
130
131         /**
132          * Answer the line number in source where the problem begins.
133          * 
134          * @return the line number in source where the problem begins
135          */
136         int getSourceLineNumber();
137
138         /**
139          * Answer the start position of the problem (inclusive), or -1 if unknown.
140          * 
141          * @return the start position of the problem (inclusive), or -1 if unknown
142          */
143         int getSourceStart();
144
145         /**
146          * Checks the severity to see if the Error bit is set.
147          * 
148          * @return true if the Error bit is set for the severity, false otherwise
149          */
150         boolean isError();
151
152         /**
153          * Checks the severity to see if the Error bit is not set.
154          * 
155          * @return true if the Error bit is not set for the severity, false otherwise
156          */
157         boolean isWarning();
158
159         /**
160          * Set the end position of the problem (inclusive), or -1 if unknown.
161          * Used for shifting problem positions.
162          * 
163          * @param sourceEnd the given end position
164          */
165         void setSourceEnd(int sourceEnd);
166
167         /**
168          * Set the line number in source where the problem begins.
169          * 
170          * @param lineNumber the given line number
171          */
172         void setSourceLineNumber(int lineNumber);
173
174         /**
175          * Set the start position of the problem (inclusive), or -1 if unknown.
176          * Used for shifting problem positions.
177          * 
178          * @param sourceStart the given start position
179          */
180         void setSourceStart(int sourceStart);
181         
182         /**
183          * Problem Categories
184          * The high bits of a problem ID contains information about the category of a problem. 
185          * For example, (problemID & TypeRelated) != 0, indicates that this problem is type related.
186          * 
187          * A problem category can help to implement custom problem filters. Indeed, when numerous problems
188          * are listed, focusing on import related problems first might be relevant.
189          * 
190          * When a problem is tagged as Internal, it means that no change other than a local source code change
191          * can  fix the corresponding problem.
192          */
193         int TypeRelated = 0x01000000;
194         int FieldRelated = 0x02000000;
195         int MethodRelated = 0x04000000;
196         int ConstructorRelated = 0x08000000;
197         int ImportRelated = 0x10000000;
198         int Internal = 0x20000000;
199         int Syntax = 0x40000000;
200         /**
201          * @since 3.0
202          */
203         int Javadoc = 0x80000000;
204         
205         /**
206          * Mask to use in order to filter out the category portion of the problem ID.
207          */
208         int IgnoreCategoriesMask = 0xFFFFFF;
209
210         /**
211          * Below are listed all available problem IDs. Note that this list could be augmented in the future, 
212          * as new features are added to the Java core implementation.
213          */
214
215         /**
216          * ID reserved for referencing an internal error inside the JavaCore implementation which
217          * may be surfaced as a problem associated with the compilation unit which caused it to occur.
218          */
219         int Unclassified = 0;
220
221         /**
222          * General type related problems
223          */
224         int ObjectHasNoSuperclass = TypeRelated + 1;
225         int UndefinedType = TypeRelated + 2;
226         int NotVisibleType = TypeRelated + 3;
227         int AmbiguousType = TypeRelated + 4;
228         int UsingDeprecatedType = TypeRelated + 5;
229         int InternalTypeNameProvided = TypeRelated + 6;
230         /** @since 2.1 */
231         int UnusedPrivateType = Internal + TypeRelated + 7;
232         
233         int IncompatibleTypesInEqualityOperator = TypeRelated + 15;
234         int IncompatibleTypesInConditionalOperator = TypeRelated + 16;
235         int TypeMismatch = TypeRelated + 17;
236         /** @since 3.0 */
237         int IndirectAccessToStaticType = Internal + TypeRelated + 18;
238         
239         /**
240          * Inner types related problems
241          */
242         int MissingEnclosingInstanceForConstructorCall = TypeRelated + 20;
243         int MissingEnclosingInstance = TypeRelated + 21;
244         int IncorrectEnclosingInstanceReference = TypeRelated + 22;
245         int IllegalEnclosingInstanceSpecification = TypeRelated + 23; 
246         int CannotDefineStaticInitializerInLocalType = Internal + 24;
247         int OuterLocalMustBeFinal = Internal + 25;
248         int CannotDefineInterfaceInLocalType = Internal + 26;
249         int IllegalPrimitiveOrArrayTypeForEnclosingInstance = TypeRelated + 27;
250         /** @since 2.1 */
251         int EnclosingInstanceInConstructorCall = Internal + 28;
252         int AnonymousClassCannotExtendFinalClass = TypeRelated + 29;
253
254         // variables
255         int UndefinedName = 50;
256         int UninitializedLocalVariable = Internal + 51;
257         int VariableTypeCannotBeVoid = Internal + 52;
258         int VariableTypeCannotBeVoidArray = Internal + 53;
259         int CannotAllocateVoidArray = Internal + 54;
260         // local variables
261         int RedefinedLocal = Internal + 55;
262         int RedefinedArgument = Internal + 56;
263         // final local variables
264         int DuplicateFinalLocalInitialization = Internal + 57;
265         /** @since 2.1 */
266         int NonBlankFinalLocalAssignment = Internal + 58;
267         
268         int FinalOuterLocalAssignment = Internal + 60;
269         int LocalVariableIsNeverUsed = Internal + 61;
270         int ArgumentIsNeverUsed = Internal + 62;
271         int BytecodeExceeds64KLimit = Internal + 63;
272         int BytecodeExceeds64KLimitForClinit = Internal + 64;
273         int TooManyArgumentSlots = Internal + 65;
274         int TooManyLocalVariableSlots = Internal + 66;
275         /** @since 2.1 */
276         int TooManySyntheticArgumentSlots = Internal + 67;
277         /** @since 2.1 */
278         int TooManyArrayDimensions = Internal + 68;
279         /** @since 2.1 */
280         int BytecodeExceeds64KLimitForConstructor = Internal + 69;
281
282         // fields
283         int UndefinedField = FieldRelated + 70;
284         int NotVisibleField = FieldRelated + 71;
285         int AmbiguousField = FieldRelated + 72;
286         int UsingDeprecatedField = FieldRelated + 73;
287         int NonStaticFieldFromStaticInvocation = FieldRelated + 74;
288         int ReferenceToForwardField = FieldRelated + Internal + 75;
289         /** @since 2.1 */
290         int NonStaticAccessToStaticField = Internal + FieldRelated + 76;
291         /** @since 2.1 */
292         int UnusedPrivateField = Internal + FieldRelated + 77;
293         /** @since 3.0 */
294         int IndirectAccessToStaticField = Internal + FieldRelated + 78;
295         /** @since 3.0 */
296         int UnqualifiedFieldAccess = Internal + FieldRelated + 79;
297         
298         // blank final fields
299         int FinalFieldAssignment = FieldRelated + 80;
300         int UninitializedBlankFinalField = FieldRelated + 81;
301         int DuplicateBlankFinalFieldInitialization = FieldRelated + 82;
302
303         // variable hiding
304         /**
305          * The local variable {0} is hiding another local variable defined in an enclosing type scope 
306          * @since 3.0
307          */
308         int LocalVariableHidingLocalVariable = Internal + 90;           
309
310         /**
311          * The local variable {0} is hiding the field {1}.{2} 
312          * @since 3.0
313          */
314         int LocalVariableHidingField = Internal + FieldRelated + 91;            
315          
316         /**
317          * The field {0}.{1} is hiding another local variable defined in an enclosing type scope
318          * @since 3.0 
319          */
320         int FieldHidingLocalVariable = Internal + FieldRelated + 92;            
321
322         /**
323          * The field {0}.{1} is hiding the field {2}.{3}
324          * @since 3.0 
325          */
326         int FieldHidingField = Internal + FieldRelated + 93;            
327
328         /**
329          * The argument {0} is hiding another local variable defined in an enclosing type scope
330          * @since 3.0 
331          */
332         int ArgumentHidingLocalVariable = Internal + 94;                
333
334         /**
335          * The argument {0} is hiding the field {2}.{3}
336          * @since 3.0 
337          */
338         int ArgumentHidingField = Internal + 95;                
339
340         // methods
341         int UndefinedMethod = MethodRelated + 100;
342         int NotVisibleMethod = MethodRelated + 101;
343         int AmbiguousMethod = MethodRelated + 102;
344         int UsingDeprecatedMethod = MethodRelated + 103;
345         int DirectInvocationOfAbstractMethod = MethodRelated + 104;
346         int VoidMethodReturnsValue = MethodRelated + 105;
347         int MethodReturnsVoid = MethodRelated + 106;
348         int MethodRequiresBody = Internal + MethodRelated + 107;
349         int ShouldReturnValue = Internal + MethodRelated + 108;
350         int MethodButWithConstructorName = MethodRelated + 110;
351         int MissingReturnType = TypeRelated + 111;
352         int BodyForNativeMethod = Internal + MethodRelated + 112;
353         int BodyForAbstractMethod = Internal + MethodRelated + 113;
354         int NoMessageSendOnBaseType = MethodRelated + 114;
355         int ParameterMismatch = MethodRelated + 115;
356         int NoMessageSendOnArrayType = MethodRelated + 116;
357         /** @since 2.1 */
358     int NonStaticAccessToStaticMethod = Internal + MethodRelated + 117;
359         /** @since 2.1 */
360         int UnusedPrivateMethod = Internal + MethodRelated + 118;
361         /** @since 3.0 */
362         int IndirectAccessToStaticMethod = Internal + MethodRelated + 119;
363
364             
365         // constructors
366         int UndefinedConstructor = ConstructorRelated + 130;
367         int NotVisibleConstructor = ConstructorRelated + 131;
368         int AmbiguousConstructor = ConstructorRelated + 132;
369         int UsingDeprecatedConstructor = ConstructorRelated + 133;
370         /** @since 2.1 */
371         int UnusedPrivateConstructor = Internal + MethodRelated + 134;
372         // explicit constructor calls
373         int InstanceFieldDuringConstructorInvocation = ConstructorRelated + 135;
374         int InstanceMethodDuringConstructorInvocation = ConstructorRelated + 136;
375         int RecursiveConstructorInvocation = ConstructorRelated + 137;
376         int ThisSuperDuringConstructorInvocation = ConstructorRelated + 138;
377         /** @since 3.0 */
378         int InvalidExplicitConstructorCall = ConstructorRelated + Syntax + 139;
379         // implicit constructor calls
380         int UndefinedConstructorInDefaultConstructor = ConstructorRelated + 140;
381         int NotVisibleConstructorInDefaultConstructor = ConstructorRelated + 141;
382         int AmbiguousConstructorInDefaultConstructor = ConstructorRelated + 142;
383         int UndefinedConstructorInImplicitConstructorCall = ConstructorRelated + 143;
384         int NotVisibleConstructorInImplicitConstructorCall = ConstructorRelated + 144;
385         int AmbiguousConstructorInImplicitConstructorCall = ConstructorRelated + 145;
386         int UnhandledExceptionInDefaultConstructor = TypeRelated + 146;
387         int UnhandledExceptionInImplicitConstructorCall = TypeRelated + 147;
388                                 
389         // expressions
390         int ArrayReferenceRequired = Internal + 150;
391         int NoImplicitStringConversionForCharArrayExpression = Internal + 151;
392         // constant expressions
393         int StringConstantIsExceedingUtf8Limit = Internal + 152;
394         int NonConstantExpression = 153;
395         int NumericValueOutOfRange = Internal + 154;
396         // cast expressions
397         int IllegalCast = TypeRelated + 156;
398         // allocations
399         int InvalidClassInstantiation = TypeRelated + 157;
400         int CannotDefineDimensionExpressionsWithInit = Internal + 158;
401         int MustDefineEitherDimensionExpressionsOrInitializer = Internal + 159;
402         // operators
403         int InvalidOperator = Internal + 160;
404         // statements
405         int CodeCannotBeReached = Internal + 161;
406         int CannotReturnInInitializer = Internal + 162;
407         int InitializerMustCompleteNormally = Internal + 163;
408         // assert
409         int InvalidVoidExpression = Internal + 164;
410         // try
411         int MaskedCatch = TypeRelated + 165;
412         int DuplicateDefaultCase = 166;
413         int UnreachableCatch = TypeRelated + MethodRelated + 167;
414         int UnhandledException = TypeRelated + 168;
415         // switch       
416         int IncorrectSwitchType = TypeRelated + 169;
417         int DuplicateCase = FieldRelated + 170;
418         // labelled
419         int DuplicateLabel = Internal + 171;
420         int InvalidBreak = Internal + 172;
421         int InvalidContinue = Internal + 173;
422         int UndefinedLabel = Internal + 174;
423         //synchronized
424         int InvalidTypeToSynchronized = Internal + 175;
425         int InvalidNullToSynchronized = Internal + 176;
426         // throw
427         int CannotThrowNull = Internal + 177;
428         // assignment
429         /** @since 2.1 */
430         int AssignmentHasNoEffect = Internal + 178;
431         /** @since 3.0 */
432         int PossibleAccidentalBooleanAssignment = Internal + 179;
433         /** @since 3.0 */
434         int SuperfluousSemicolon = Internal + 180;
435         /** @since 3.0 */
436         int UnnecessaryCast = Internal + TypeRelated + 181;
437         /** @since 3.0 */
438         int UnnecessaryArgumentCast = Internal + TypeRelated + 182;
439         /** @since 3.0 */
440         int UnnecessaryInstanceof = Internal + TypeRelated + 183;       
441         /** @since 3.0 */
442         int FinallyMustCompleteNormally = Internal + 184;       
443         /** @since 3.0 */
444         int UnusedMethodDeclaredThrownException = Internal + 185;       
445         /** @since 3.0 */
446         int UnusedConstructorDeclaredThrownException = Internal + 186;  
447         /** @since 3.0 */
448         int InvalidCatchBlockSequence = Internal + TypeRelated + 187;   
449         /** @since 3.0 */
450         int EmptyControlFlowStatement = Internal + TypeRelated + 188;   
451         /** @since 3.0 */
452         int UnnecessaryElse = Internal + 189;   
453
454         // inner emulation
455         int NeedToEmulateFieldReadAccess = FieldRelated + 190;
456         int NeedToEmulateFieldWriteAccess = FieldRelated + 191;
457         int NeedToEmulateMethodAccess = MethodRelated + 192;
458         int NeedToEmulateConstructorAccess = MethodRelated + 193;
459
460         //inherited name hides enclosing name (sort of ambiguous)
461         int InheritedMethodHidesEnclosingName = MethodRelated + 195;
462         int InheritedFieldHidesEnclosingName = FieldRelated + 196;
463         int InheritedTypeHidesEnclosingName = TypeRelated + 197;
464
465         // miscellaneous
466         int ThisInStaticContext = Internal + 200;
467         int StaticMethodRequested = Internal + MethodRelated + 201;
468         int IllegalDimension = Internal + 202;
469         int InvalidTypeExpression = Internal + 203;
470         int ParsingError = Syntax + Internal + 204;
471         int ParsingErrorNoSuggestion = Syntax + Internal + 205;
472         int InvalidUnaryExpression = Syntax + Internal + 206;
473
474         // syntax errors
475         int InterfaceCannotHaveConstructors = Syntax + Internal + 207;
476         int ArrayConstantsOnlyInArrayInitializers = Syntax + Internal + 208;
477         int ParsingErrorOnKeyword = Syntax + Internal + 209;    
478         int ParsingErrorOnKeywordNoSuggestion = Syntax + Internal + 210;
479
480         int UnmatchedBracket = Syntax + Internal + 220;
481         int NoFieldOnBaseType = FieldRelated + 221;
482         int InvalidExpressionAsStatement = Syntax + Internal + 222;
483         /** @since 2.1 */
484         int ExpressionShouldBeAVariable = Syntax + Internal + 223;
485         /** @since 2.1 */
486         int MissingSemiColon = Syntax + Internal + 224;
487         /** @since 2.1 */
488         int InvalidParenthesizedExpression = Syntax + Internal + 225;
489         
490         /** @since 3.0 */
491         int ParsingErrorInsertTokenBefore = Syntax + Internal + 230;
492         /** @since 3.0 */
493         int ParsingErrorInsertTokenAfter = Syntax + Internal + 231;
494         /** @since 3.0 */
495     int ParsingErrorDeleteToken = Syntax + Internal + 232;
496     /** @since 3.0 */
497     int ParsingErrorDeleteTokens = Syntax + Internal + 233;
498     /** @since 3.0 */
499     int ParsingErrorMergeTokens = Syntax + Internal + 234;
500     /** @since 3.0 */
501     int ParsingErrorInvalidToken = Syntax + Internal + 235;
502     /** @since 3.0 */
503     int ParsingErrorMisplacedConstruct = Syntax + Internal + 236;
504     /** @since 3.0 */
505     int ParsingErrorReplaceTokens = Syntax + Internal + 237;
506     /** @since 3.0 */
507     int ParsingErrorNoSuggestionForTokens = Syntax + Internal + 238;
508     /** @since 3.0 */
509     int ParsingErrorUnexpectedEOF = Syntax + Internal + 239;
510     /** @since 3.0 */
511     int ParsingErrorInsertToComplete = Syntax + Internal + 240;
512     /** @since 3.0 */
513     int ParsingErrorInsertToCompleteScope = Syntax + Internal + 241;
514     /** @since 3.0 */
515     int ParsingErrorInsertToCompletePhrase = Syntax + Internal + 242;
516     
517         // scanner errors
518         int EndOfSource = Syntax + Internal + 250;
519         int InvalidHexa = Syntax + Internal + 251;
520         int InvalidOctal = Syntax + Internal + 252;
521         int InvalidCharacterConstant = Syntax + Internal + 253;
522         int InvalidEscape = Syntax + Internal + 254;
523         int InvalidInput = Syntax + Internal + 255;
524         int InvalidUnicodeEscape = Syntax + Internal + 256;
525         int InvalidFloat = Syntax + Internal + 257;
526         int NullSourceString = Syntax + Internal + 258;
527         int UnterminatedString = Syntax + Internal + 259;
528         int UnterminatedComment = Syntax + Internal + 260;
529
530         // type related problems
531         int InterfaceCannotHaveInitializers = TypeRelated + 300;
532         int DuplicateModifierForType = TypeRelated + 301;
533         int IllegalModifierForClass = TypeRelated + 302;
534         int IllegalModifierForInterface = TypeRelated + 303;
535         int IllegalModifierForMemberClass = TypeRelated + 304;
536         int IllegalModifierForMemberInterface = TypeRelated + 305;
537         int IllegalModifierForLocalClass = TypeRelated + 306;
538
539         int IllegalModifierCombinationFinalAbstractForClass = TypeRelated + 308;
540         int IllegalVisibilityModifierForInterfaceMemberType = TypeRelated + 309;
541         int IllegalVisibilityModifierCombinationForMemberType = TypeRelated + 310;
542         int IllegalStaticModifierForMemberType = TypeRelated + 311;
543         int SuperclassMustBeAClass = TypeRelated + 312;
544         int ClassExtendFinalClass = TypeRelated + 313;
545         int DuplicateSuperInterface = TypeRelated + 314;
546         int SuperInterfaceMustBeAnInterface = TypeRelated + 315;
547         int HierarchyCircularitySelfReference = TypeRelated + 316;
548         int HierarchyCircularity = TypeRelated + 317;
549         int HidingEnclosingType = TypeRelated + 318;
550         int DuplicateNestedType = TypeRelated + 319;
551         int CannotThrowType = TypeRelated + 320;
552         int PackageCollidesWithType = TypeRelated + 321;
553         int TypeCollidesWithPackage = TypeRelated + 322;
554         int DuplicateTypes = TypeRelated + 323;
555         int IsClassPathCorrect = TypeRelated + 324;
556         int PublicClassMustMatchFileName = TypeRelated + 325;
557         int MustSpecifyPackage = 326;
558         int HierarchyHasProblems = TypeRelated + 327;
559         int PackageIsNotExpectedPackage = 328;
560         /** @since 2.1 */
561         int ObjectCannotHaveSuperTypes = 329;
562
563         // int InvalidSuperclassBase = TypeRelated + 329; // reserved to 334 included
564         int SuperclassNotFound =  TypeRelated + 329 + ProblemReasons.NotFound; // TypeRelated + 330
565         int SuperclassNotVisible =  TypeRelated + 329 + ProblemReasons.NotVisible; // TypeRelated + 331
566         int SuperclassAmbiguous =  TypeRelated + 329 + ProblemReasons.Ambiguous; // TypeRelated + 332
567         int SuperclassInternalNameProvided =  TypeRelated + 329 + ProblemReasons.InternalNameProvided; // TypeRelated + 333
568         int SuperclassInheritedNameHidesEnclosingName =  TypeRelated + 329 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 334
569
570         // int InvalidInterfaceBase = TypeRelated + 334; // reserved to 339 included
571         int InterfaceNotFound =  TypeRelated + 334 + ProblemReasons.NotFound; // TypeRelated + 335
572         int InterfaceNotVisible =  TypeRelated + 334 + ProblemReasons.NotVisible; // TypeRelated + 336
573         int InterfaceAmbiguous =  TypeRelated + 334 + ProblemReasons.Ambiguous; // TypeRelated + 337
574         int InterfaceInternalNameProvided =  TypeRelated + 334 + ProblemReasons.InternalNameProvided; // TypeRelated + 338
575         int InterfaceInheritedNameHidesEnclosingName =  TypeRelated + 334 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 339
576
577         // field related problems
578         int DuplicateField = FieldRelated + 340;
579         int DuplicateModifierForField = FieldRelated + 341;
580         int IllegalModifierForField = FieldRelated + 342;
581         int IllegalModifierForInterfaceField = FieldRelated + 343;
582         int IllegalVisibilityModifierCombinationForField = FieldRelated + 344;
583         int IllegalModifierCombinationFinalVolatileForField = FieldRelated + 345;
584         int UnexpectedStaticModifierForField = FieldRelated + 346;
585
586         // int FieldTypeProblemBase = FieldRelated + 349; //reserved to 354
587         int FieldTypeNotFound =  FieldRelated + 349 + ProblemReasons.NotFound; // FieldRelated + 350
588         int FieldTypeNotVisible =  FieldRelated + 349 + ProblemReasons.NotVisible; // FieldRelated + 351
589         int FieldTypeAmbiguous =  FieldRelated + 349 + ProblemReasons.Ambiguous; // FieldRelated + 352
590         int FieldTypeInternalNameProvided =  FieldRelated + 349 + ProblemReasons.InternalNameProvided; // FieldRelated + 353
591         int FieldTypeInheritedNameHidesEnclosingName =  FieldRelated + 349 + ProblemReasons.InheritedNameHidesEnclosingName; // FieldRelated + 354
592         
593         // method related problems
594         int DuplicateMethod = MethodRelated + 355;
595         int IllegalModifierForArgument = MethodRelated + 356;
596         int DuplicateModifierForMethod = MethodRelated + 357;
597         int IllegalModifierForMethod = MethodRelated + 358;
598         int IllegalModifierForInterfaceMethod = MethodRelated + 359;
599         int IllegalVisibilityModifierCombinationForMethod = MethodRelated + 360;
600         int UnexpectedStaticModifierForMethod = MethodRelated + 361;
601         int IllegalAbstractModifierCombinationForMethod = MethodRelated + 362;
602         int AbstractMethodInAbstractClass = MethodRelated + 363;
603         int ArgumentTypeCannotBeVoid = MethodRelated + 364;
604         int ArgumentTypeCannotBeVoidArray = MethodRelated + 365;
605         int ReturnTypeCannotBeVoidArray = MethodRelated + 366;
606         int NativeMethodsCannotBeStrictfp = MethodRelated + 367;
607         int DuplicateModifierForArgument = MethodRelated + 368;
608
609         //      int ArgumentProblemBase = MethodRelated + 369; // reserved to 374 included.
610         int ArgumentTypeNotFound =  MethodRelated + 369 + ProblemReasons.NotFound; // MethodRelated + 370
611         int ArgumentTypeNotVisible =  MethodRelated + 369 + ProblemReasons.NotVisible; // MethodRelated + 371
612         int ArgumentTypeAmbiguous =  MethodRelated + 369 + ProblemReasons.Ambiguous; // MethodRelated + 372
613         int ArgumentTypeInternalNameProvided =  MethodRelated + 369 + ProblemReasons.InternalNameProvided; // MethodRelated + 373
614         int ArgumentTypeInheritedNameHidesEnclosingName =  MethodRelated + 369 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 374
615
616         //      int ExceptionTypeProblemBase = MethodRelated + 374; // reserved to 379 included.
617         int ExceptionTypeNotFound =  MethodRelated + 374 + ProblemReasons.NotFound; // MethodRelated + 375
618         int ExceptionTypeNotVisible =  MethodRelated + 374 + ProblemReasons.NotVisible; // MethodRelated + 376
619         int ExceptionTypeAmbiguous =  MethodRelated + 374 + ProblemReasons.Ambiguous; // MethodRelated + 377
620         int ExceptionTypeInternalNameProvided =  MethodRelated + 374 + ProblemReasons.InternalNameProvided; // MethodRelated + 378
621         int ExceptionTypeInheritedNameHidesEnclosingName =  MethodRelated + 374 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 379
622
623         //      int ReturnTypeProblemBase = MethodRelated + 379;
624         int ReturnTypeNotFound =  MethodRelated + 379 + ProblemReasons.NotFound; // MethodRelated + 380
625         int ReturnTypeNotVisible =  MethodRelated + 379 + ProblemReasons.NotVisible; // MethodRelated + 381
626         int ReturnTypeAmbiguous =  MethodRelated + 379 + ProblemReasons.Ambiguous; // MethodRelated + 382
627         int ReturnTypeInternalNameProvided =  MethodRelated + 379 + ProblemReasons.InternalNameProvided; // MethodRelated + 383
628         int ReturnTypeInheritedNameHidesEnclosingName =  MethodRelated + 379 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 384
629
630         // import related problems
631         int ConflictingImport = ImportRelated + 385;
632         int DuplicateImport = ImportRelated + 386;
633         int CannotImportPackage = ImportRelated + 387;
634         int UnusedImport = ImportRelated + 388;
635
636         //      int ImportProblemBase = ImportRelated + 389;
637         int ImportNotFound =  ImportRelated + 389 + ProblemReasons.NotFound; // ImportRelated + 390
638         int ImportNotVisible =  ImportRelated + 389 + ProblemReasons.NotVisible; // ImportRelated + 391
639         int ImportAmbiguous =  ImportRelated + 389 + ProblemReasons.Ambiguous; // ImportRelated + 392
640         int ImportInternalNameProvided =  ImportRelated + 389 + ProblemReasons.InternalNameProvided; // ImportRelated + 393
641         int ImportInheritedNameHidesEnclosingName =  ImportRelated + 389 + ProblemReasons.InheritedNameHidesEnclosingName; // ImportRelated + 394
642
643         // local variable related problems
644         int DuplicateModifierForVariable = MethodRelated + 395;
645         int IllegalModifierForVariable = MethodRelated + 396;
646
647         // method verifier problems
648         int AbstractMethodMustBeImplemented = MethodRelated + 400;
649         int FinalMethodCannotBeOverridden = MethodRelated + 401;
650         int IncompatibleExceptionInThrowsClause = MethodRelated + 402;
651         int IncompatibleExceptionInInheritedMethodThrowsClause = MethodRelated + 403;
652         int IncompatibleReturnType = MethodRelated + 404;
653         int InheritedMethodReducesVisibility = MethodRelated + 405;
654         int CannotOverrideAStaticMethodWithAnInstanceMethod = MethodRelated + 406;
655         int CannotHideAnInstanceMethodWithAStaticMethod = MethodRelated + 407;
656         int StaticInheritedMethodConflicts = MethodRelated + 408;
657         int MethodReducesVisibility = MethodRelated + 409;
658         int OverridingNonVisibleMethod = MethodRelated + 410;
659         int AbstractMethodCannotBeOverridden = MethodRelated + 411;
660         int OverridingDeprecatedMethod = MethodRelated + 412;
661         /** @since 2.1 */
662         int IncompatibleReturnTypeForNonInheritedInterfaceMethod = MethodRelated + 413;
663         /** @since 2.1 */
664         int IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod = MethodRelated + 414;
665         
666         // code snippet support
667         int CodeSnippetMissingClass = Internal + 420;
668         int CodeSnippetMissingMethod = Internal + 421;
669         int NonExternalizedStringLiteral = Internal + 261;
670         int CannotUseSuperInCodeSnippet = Internal + 422;
671         
672         //constant pool
673         int TooManyConstantsInConstantPool = Internal + 430;
674         /** @since 2.1 */
675         int TooManyBytesForStringConstant = Internal + 431;
676
677         // static constraints
678         /** @since 2.1 */
679         int TooManyFields = Internal + 432;
680         /** @since 2.1 */
681         int TooManyMethods = Internal + 433; 
682                 
683         // 1.4 features
684         // assertion warning
685         int UseAssertAsAnIdentifier = Internal + 440;
686         
687         // detected task
688         /** @since 2.1 */
689         int Task = Internal + 450;
690         
691         // block
692         /** @since 3.0 */
693         int UndocumentedEmptyBlock = Internal + 460;
694                 
695         /*
696          * Javadoc comments
697          */
698         /** @since 3.0 */
699         int JavadocUnexpectedTag = Javadoc + Internal + 470;
700         /** @since 3.0 */
701         int JavadocMissingParamTag = Javadoc + Internal + 471;
702         /** @since 3.0 */
703         int JavadocMissingParamName = Javadoc + Internal + 472;
704         /** @since 3.0 */
705         int JavadocDuplicateParamName = Javadoc + Internal + 473;
706         /** @since 3.0 */
707         int JavadocInvalidParamName = Javadoc + Internal + 474;
708         /** @since 3.0 */
709         int JavadocMissingReturnTag = Javadoc + Internal + 475;
710         /** @since 3.0 */
711         int JavadocDuplicateReturnTag = Javadoc + Internal + 476;
712         /** @since 3.0 */
713         int JavadocMissingThrowsTag = Javadoc + Internal + 477;
714         /** @since 3.0 */
715         int JavadocMissingThrowsClassName = Javadoc + Internal + 478;
716         /** @since 3.0 */
717         int JavadocInvalidThrowsClass = Javadoc + Internal + 479;
718         /** @since 3.0 */
719         int JavadocDuplicateThrowsClassName = Javadoc + Internal + 480;
720         /** @since 3.0 */
721         int JavadocInvalidThrowsClassName = Javadoc + Internal + 481;
722         /** @since 3.0 */
723         int JavadocMissingSeeReference = Javadoc + Internal + 482;
724         /** @since 3.0 */
725         int JavadocInvalidSeeReference = Javadoc + Internal + 483;
726         /** @since 3.0 */
727         int JavadocInvalidSeeHref = Javadoc + Internal + 484;
728         /** @since 3.0 */
729         int JavadocInvalidSeeArgs = Javadoc + Internal + 485;
730         /** @since 3.0 */
731         int JavadocMissing = Javadoc + Internal + 486;
732         /** @since 3.0 */
733         int JavadocInvalidTag = Javadoc + Internal + 487;
734         /*
735          * ID for field errors in Javadoc
736          */
737         /** @since 3.0 */
738         int JavadocUndefinedField = Javadoc + Internal + 488;
739         /** @since 3.0 */
740         int JavadocNotVisibleField = Javadoc + Internal + 489;
741         /** @since 3.0 */
742         int JavadocAmbiguousField = Javadoc + Internal + 490;
743         /** @since 3.0 */
744         int JavadocUsingDeprecatedField = Javadoc + Internal + 491;
745         /*
746          * IDs for constructor errors in Javadoc
747          */
748         /** @since 3.0 */
749         int JavadocUndefinedConstructor = Javadoc + Internal + 492;
750         /** @since 3.0 */
751         int JavadocNotVisibleConstructor = Javadoc + Internal + 493;
752         /** @since 3.0 */
753         int JavadocAmbiguousConstructor = Javadoc + Internal + 494;
754         /** @since 3.0 */
755         int JavadocUsingDeprecatedConstructor = Javadoc + Internal + 495;
756         /*
757          * IDs for method errors in Javadoc
758          */
759         /** @since 3.0 */
760         int JavadocUndefinedMethod = Javadoc + Internal + 496;
761         /** @since 3.0 */
762         int JavadocNotVisibleMethod = Javadoc + Internal + 497;
763         /** @since 3.0 */
764         int JavadocAmbiguousMethod = Javadoc + Internal + 498;
765         /** @since 3.0 */
766         int JavadocUsingDeprecatedMethod = Javadoc + Internal + 499;
767         /** @since 3.0 */
768         int JavadocNoMessageSendOnBaseType = Javadoc + Internal + 500;
769         /** @since 3.0 */
770         int JavadocParameterMismatch = Javadoc + Internal + 501;
771         /** @since 3.0 */
772         int JavadocNoMessageSendOnArrayType = Javadoc + Internal + 502;
773         /*
774          * IDs for type errors in Javadoc
775          */
776         /** @since 3.0 */
777         int JavadocUndefinedType = Javadoc + Internal + 503;
778         /** @since 3.0 */
779         int JavadocNotVisibleType = Javadoc + Internal + 504;
780         /** @since 3.0 */
781         int JavadocAmbiguousType = Javadoc + Internal + 505;
782         /** @since 3.0 */
783         int JavadocUsingDeprecatedType = Javadoc + Internal + 506;
784         /** @since 3.0 */
785         int JavadocInternalTypeNameProvided = Javadoc + Internal + 507;
786         /** @since 3.0 */
787         int JavadocInheritedMethodHidesEnclosingName = Javadoc + Internal + 508;
788         /** @since 3.0 */
789         int JavadocInheritedFieldHidesEnclosingName = Javadoc + Internal + 509;
790         /** @since 3.0 */
791         int JavadocInheritedNameHidesEnclosingTypeName = Javadoc + Internal + 510;
792         /** @since 3.0 */
793         int JavadocAmbiguousMethodReference = Javadoc + Internal + 511;
794         /** @since 3.0 */
795         int JavadocUnterminatedInlineTag = Javadoc + Internal + 512;
796         /** @since 3.0 */
797         int JavadocMalformedSeeReference = Javadoc + Internal + 513;
798         /** @since 3.0 */
799         int JavadocMessagePrefix = Internal + 515;
800 }