All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.uniroma2.art.coda.exception.parserexception.AnnotationTargetNotCompatibleException Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
package it.uniroma2.art.coda.exception.parserexception;

public class AnnotationTargetNotCompatibleException extends PRParserException {

	private String annName;
	private String ruleId;
	private String targetNotCompatible;

	private static final long serialVersionUID = 1L;

	public AnnotationTargetNotCompatibleException(String annName, String ruleId, String targetNotCompatible) {
		super();
		this.annName = annName;
		this.ruleId = ruleId;
		this.targetNotCompatible = targetNotCompatible;
	}

	public AnnotationTargetNotCompatibleException(Exception e, String prefixName, String ruleId, String targetNotCompatible) {
		super(e);
		this.annName = prefixName;
		this.ruleId = ruleId;
		this.targetNotCompatible = targetNotCompatible;
	}
	
	public String getAnnName(){
		return annName;
	}
	
	public String getRuleId() {
		return ruleId;
	}

	public String getTargetNotCompatible(){
		return targetNotCompatible;
	}

	@Override
	public String getErrorAsString() {
		return "annotation "+ annName +" in rule "+ruleId+" has at least one target not compatible with its Annotation Definition. " +
				"Target not compatible:  "+targetNotCompatible;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy