Drools :: Compiler 6.2.0.Final

org.drools.compiler.lang.dsl
Class MappingError

java.lang.Object
  extended by org.drools.compiler.compiler.BaseKnowledgeBuilderResultImpl
      extended by org.drools.compiler.compiler.DroolsError
          extended by org.drools.compiler.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
static int ERROR_INVALID_TOKEN
           
static int ERROR_UNDECLARED_TOKEN
           
static int ERROR_UNMATCHED_BRACES
           
static int ERROR_UNUSED_TOKEN
           
static int TEMPLATE_NATURAL
           
static int TEMPLATE_TARGET
           
static int TEMPLATE_UNKNOWN
           
 
Constructor Summary
MappingError(int errorCode, int template, int offset, String token, String templateText, int line)
           
 
Method Summary
 int getErrorCode()
          Returns this error code
 int[] getLines()
          Returns the lines of the error in the source file
 String getMessage()
          Classes that extend this must provide a printable message, which summarises the error.
 int getOffset()
           
 int getTemplate()
           
 String getTemplateText()
           
 
Methods inherited from class org.drools.compiler.compiler.DroolsError
getNamespace, getSeverity
 
Methods inherited from class org.drools.compiler.compiler.BaseKnowledgeBuilderResultImpl
equals, getResource, hashCode, isError, setResource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kie.internal.builder.KnowledgeBuilderResult
getResource
 

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
Constructor Detail

MappingError

public MappingError(int errorCode,
                    int template,
                    int offset,
                    String token,
                    String templateText,
                    int line)
Method Detail

getErrorCode

public int getErrorCode()
Returns this error code

Returns:

getLines

public int[] getLines()
Description copied from class: BaseKnowledgeBuilderResultImpl
Returns the lines of the error in the source file

Specified by:
getLines in interface org.kie.internal.builder.KnowledgeBuilderResult
Specified by:
getLines in class BaseKnowledgeBuilderResultImpl

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: BaseKnowledgeBuilderResultImpl
Classes that extend this must provide a printable message, which summarises the error.

Specified by:
getMessage in interface org.kie.internal.builder.KnowledgeBuilderResult
Specified by:
getMessage in class BaseKnowledgeBuilderResultImpl
See Also:
org.kie.compiler.DroolsError#getMessage()

Drools :: Compiler 6.2.0.Final

Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.