|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.model.compiler.CompilerErrorModel
public class CompilerErrorModel
Contains the CompilerErrors for a particular file after a compile has ended.
| Constructor Summary | |
|---|---|
CompilerErrorModel()
Constructs an empty CompilerErrorModel with no errors and a dummy global model. |
|
CompilerErrorModel(DJError[] errors,
GlobalModel model)
Constructs a new CompilerErrorModel with specified global model. |
|
| Method Summary | |
|---|---|
DJError |
getError(int idx)
Accessor for errors maintained here. |
DJError |
getErrorAtOffset(OpenDefinitionsDocument odd,
int offset)
This method finds and returns the error that is at the given offset |
int |
getNumCompErrors()
Returns the number of CompilerErrors that are compiler errors |
int |
getNumErrors()
Returns the number of CompilerErrors. |
int |
getNumWarnings()
Returns the number of CompilerErrors that are warnings |
Position |
getPosition(DJError error)
Returns the position of the given error in the document representing its file. |
boolean |
hasErrorsWithPositions(OpenDefinitionsDocument odd)
This function tells if there are errors with source locations associated with the given file. |
boolean |
hasOnlyWarnings()
Checks whether all CompilerErrors contained here are actually warnings. |
String |
toString()
Prints out this model's errors. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CompilerErrorModel()
public CompilerErrorModel(DJError[] errors,
GlobalModel model)
errors - the list of DJError's (or a subclass).model - is the model to find documents from| Method Detail |
|---|
public DJError getError(int idx)
idx - the index of the error to retrieve
NullPointerException - if this object was improperly initialized
ArrayIndexOutOfBoundsException - if !(0 <= idx < this.getNumErrors())public Position getPosition(DJError error)
public int getNumErrors()
public int getNumCompErrors()
public int getNumWarnings()
public String toString()
toString in class Object
public DJError getErrorAtOffset(OpenDefinitionsDocument odd,
int offset)
odd - the OpenDefinitionsDocument where you want to find the error at the caretoffset - the offset into the document
public boolean hasErrorsWithPositions(OpenDefinitionsDocument odd)
public boolean hasOnlyWarnings()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||