Package org.drools.drl.parser.lang.dsl
Class MappingError
- java.lang.Object
-
- org.drools.drl.parser.BaseKnowledgeBuilderResultImpl
-
- org.drools.drl.parser.DroolsError
-
- org.drools.drl.parser.lang.dsl.MappingError
-
- All Implemented Interfaces:
org.kie.internal.builder.KnowledgeBuilderError,org.kie.internal.builder.KnowledgeBuilderResult
public class MappingError extends DroolsError
MappingError A class to represent errors found in a DSL mapping Created: 11/04/2006
-
-
Field Summary
Fields Modifier and Type Field Description static intERROR_INVALID_TOKENstatic intERROR_UNDECLARED_TOKENstatic intERROR_UNMATCHED_BRACESstatic intERROR_UNUSED_TOKENstatic intTEMPLATE_NATURALstatic intTEMPLATE_TARGETstatic intTEMPLATE_UNKNOWN
-
Constructor Summary
Constructors Constructor Description MappingError(int errorCode, int template, int offset, String token, String templateText, int line)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetErrorCode()Returns this error codeint[]getLines()Returns the lines of the error in the source fileStringgetMessage()Classes that extend this must provide a printable message, which summarises the error.intgetOffset()intgetTemplate()StringgetTemplateText()-
Methods inherited from class org.drools.drl.parser.DroolsError
getNamespace, getSeverity
-
Methods inherited from class org.drools.drl.parser.BaseKnowledgeBuilderResultImpl
asMessage, equals, getResource, hashCode, isError, setResource, toString
-
-
-
-
Field Detail
-
TEMPLATE_UNKNOWN
public static final int TEMPLATE_UNKNOWN
- See Also:
- Constant Field Values
-
TEMPLATE_NATURAL
public static final int TEMPLATE_NATURAL
- See Also:
- Constant Field Values
-
TEMPLATE_TARGET
public static final int TEMPLATE_TARGET
- See Also:
- Constant Field Values
-
ERROR_UNUSED_TOKEN
public static final int ERROR_UNUSED_TOKEN
- See Also:
- Constant Field Values
-
ERROR_UNDECLARED_TOKEN
public static final int ERROR_UNDECLARED_TOKEN
- See Also:
- Constant Field Values
-
ERROR_INVALID_TOKEN
public static final int ERROR_INVALID_TOKEN
- See Also:
- Constant Field Values
-
ERROR_UNMATCHED_BRACES
public static final int ERROR_UNMATCHED_BRACES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getErrorCode
public int getErrorCode()
Returns this error code- Returns:
-
getLines
public int[] getLines()
Description copied from class:BaseKnowledgeBuilderResultImplReturns the lines of the error in the source file- Specified by:
getLinesin interfaceorg.kie.internal.builder.KnowledgeBuilderResult- Specified by:
getLinesin classBaseKnowledgeBuilderResultImpl
-
getOffset
public int getOffset()
- Returns:
- the offset
-
getTemplate
public int getTemplate()
- Returns:
- the template
-
getTemplateText
public String getTemplateText()
- Returns:
- the original content.
-
getMessage
public String getMessage()
Description copied from class:BaseKnowledgeBuilderResultImplClasses that extend this must provide a printable message, which summarises the error.- Specified by:
getMessagein interfaceorg.kie.internal.builder.KnowledgeBuilderResult- Specified by:
getMessagein classBaseKnowledgeBuilderResultImpl
-
-