org.eclipse.jdt.internal.compiler.problem
类 DefaultProblemFactory

java.lang.Object
  继承者 org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory
所有已实现的接口:
IProblemFactory

public class DefaultProblemFactory
extends Object
implements IProblemFactory


字段摘要
 HashtableOfInt messageTemplates
           
 
构造方法摘要
DefaultProblemFactory()
           
DefaultProblemFactory(Locale loc)
           
 
方法摘要
 CategorizedProblem createProblem(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.
 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
 Locale getLocale()
          Answer the locale used to retrieve the error messages
 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.
 String getLocalizedMessage(int id, String[] problemArguments)
           
static HashtableOfInt loadMessageTemplates(Locale loc)
          This method initializes the MessageTemplates class variable according to the current Locale.
 String localizedMessage(CategorizedProblem problem)
           
 void setLocale(Locale locale)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

messageTemplates

public HashtableOfInt messageTemplates
构造方法详细信息

DefaultProblemFactory

public DefaultProblemFactory()

DefaultProblemFactory

public DefaultProblemFactory(Locale loc)
参数:
loc - the locale used to get the right message
方法详细信息

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

指定者:
接口 IProblemFactory 中的 createProblem
参数:
originatingFileName - char[]
problemId - int
problemArguments - String[]
messageArguments - String[]
severity - int
startPosition - int
endPosition - int
lineNumber - int
返回:
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)
从接口 IProblemFactory 复制的描述
Answer a new IProblem created according to the parameters values.

指定者:
接口 IProblemFactory 中的 createProblem
参数:
originatingFileName - the name of the file from which the problem is originated
problemId - the problem id
problemArguments - the fully qualified arguments recorded inside the problem
elaborationId - 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 problem
startPosition - the start position of the problem
endPosition - the end position of the problem
lineNumber - the line on which the problem occurred
返回:
a new IProblem created according to the parameters values.

getLocale

public Locale getLocale()
Answer the locale used to retrieve the error messages

指定者:
接口 IProblemFactory 中的 getLocale
返回:
java.util.Locale

setLocale

public void setLocale(Locale locale)

getLocalizedMessage

public final String getLocalizedMessage(int id,
                                        String[] problemArguments)
指定者:
接口 IProblemFactory 中的 getLocalizedMessage

getLocalizedMessage

public final String getLocalizedMessage(int id,
                                        int elaborationId,
                                        String[] problemArguments)
从接口 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.

指定者:
接口 IProblemFactory 中的 getLocalizedMessage
参数:
id - the problem id taken from IProblem constants
elaborationId - 0 if the considered problem has no elaboration, a valid elaboration id else
problemArguments - the arguments to inject into the template
返回:
a localized message elaborated from the supplied problem id, elaboration id and message parameters

localizedMessage

public final String localizedMessage(CategorizedProblem problem)
参数:
problem - CategorizedProblem
返回:
String

loadMessageTemplates

public static HashtableOfInt loadMessageTemplates(Locale loc)
This method initializes the MessageTemplates class variable according to the current Locale.

参数:
loc - Locale
返回:
HashtableOfInt


Copyright © 2013. All Rights Reserved.