Klasse DefaultProblemFactory
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory
- Alle implementierten Schnittstellen:
IProblemFactory
- Bekannte direkte Unterklassen:
CancelableProblemFactory
,CompletionEngine.CompletionProblemFactory
,ProblemFactory
-
Feldübersicht
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcreateProblem
(char[] originatingFileName, int problemId, String[] problemArguments, int elaborationId, String[] messageArguments, int severity, int startPosition, int endPosition, int lineNumber, int columnNumber) Answer a new IProblem created according to the parameters values.createProblem
(char[] originatingFileName, int problemId, String[] problemArguments, String[] messageArguments, int severity, int startPosition, int endPosition, int lineNumber, int columnNumber) Answer a new IProblem created according to the parameters value originatingFileName the name of the file name from which the problem is originated problemId the problem id problemArguments the fully qualified arguments recorded inside the problem messageArguments the arguments needed to set the error message (shorter names than problemArguments ones) severity the severity of the problem startPosition the starting position of the problem endPosition the end position of the problem lineNumber the line on which the problem occuredAnswer the locale used to retrieve the error messagesfinal String
getLocalizedMessage
(int id, int elaborationId, String[] problemArguments) Inject the supplied message arguments into a localized template elaborated from the supplied problem id and an optional elaboration id and return the resulting message.final String
getLocalizedMessage
(int id, String[] problemArguments) static HashtableOfInt
This method initializes the MessageTemplates class variable according to the current Locale.final String
localizedMessage
(CategorizedProblem problem) void
-
Felddetails
-
messageTemplates
-
-
Konstruktordetails
-
DefaultProblemFactory
public DefaultProblemFactory() -
DefaultProblemFactory
- Parameter:
loc
- the locale used to get the right message
-
-
Methodendetails
-
createProblem
public CategorizedProblem createProblem(char[] originatingFileName, int problemId, String[] problemArguments, String[] messageArguments, int severity, int startPosition, int endPosition, int lineNumber, int columnNumber) Answer a new IProblem created according to the parameters value- originatingFileName the name of the file name from which the problem is originated
- problemId the problem id
- problemArguments the fully qualified arguments recorded inside the problem
- messageArguments the arguments needed to set the error message (shorter names than problemArguments ones)
- severity the severity of the problem
- startPosition the starting position of the problem
- endPosition the end position of the problem
- lineNumber the line on which the problem occured
- Angegeben von:
createProblem
in SchnittstelleIProblemFactory
- Parameter:
originatingFileName
- char[]problemId
- intproblemArguments
- String[]messageArguments
- String[]severity
- intstartPosition
- intendPosition
- intlineNumber
- int- Gibt zurück:
- CategorizedProblem
-
createProblem
public CategorizedProblem createProblem(char[] originatingFileName, int problemId, String[] problemArguments, int elaborationId, String[] messageArguments, int severity, int startPosition, int endPosition, int lineNumber, int columnNumber) Beschreibung aus Schnittstelle kopiert:IProblemFactory
Answer a new IProblem created according to the parameters values.- Angegeben von:
createProblem
in SchnittstelleIProblemFactory
- Parameter:
originatingFileName
- the name of the file from which the problem is originatedproblemId
- the problem idproblemArguments
- the fully qualified arguments recorded inside the problemelaborationId
- the message elaboration id (0 for problems that have no message elaboration)messageArguments
- the arguments needed to set the error message (shorter names than problemArguments ones)severity
- the severity of the problemstartPosition
- the start position of the problemendPosition
- the end position of the problemlineNumber
- the line on which the problem occurred- Gibt zurück:
- a new IProblem created according to the parameters values.
-
getLocale
Answer the locale used to retrieve the error messages- Angegeben von:
getLocale
in SchnittstelleIProblemFactory
- Gibt zurück:
- java.util.Locale
-
setLocale
-
getLocalizedMessage
- Angegeben von:
getLocalizedMessage
in SchnittstelleIProblemFactory
-
getLocalizedMessage
Beschreibung aus Schnittstelle kopiert:IProblemFactory
Inject the supplied message arguments into a localized template elaborated from the supplied problem id and an optional elaboration id and return the resulting message. The arguments number should match the highest placeholder index in the template. When an elaboration id is used, the template matching that elaboration id replaces '{0}' into the template matching the problem id before the message arguments are injected.- Angegeben von:
getLocalizedMessage
in SchnittstelleIProblemFactory
- Parameter:
id
- the problem id taken fromIProblem
constantselaborationId
- 0 if the considered problem has no elaboration, a valid elaboration id elseproblemArguments
- the arguments to inject into the template- Gibt zurück:
- a localized message elaborated from the supplied problem id, elaboration id and message parameters
-
localizedMessage
- Parameter:
problem
- CategorizedProblem- Gibt zurück:
- String
-
loadMessageTemplates
This method initializes the MessageTemplates class variable according to the current Locale.- Parameter:
loc
- Locale- Gibt zurück:
- HashtableOfInt
-