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

eu.cqse.check.framework.scanner.WorkItemStatementOracle Maven / Gradle / Ivy

Go to download

The Teamscale Custom Check API allows users to extend Teamscale by writing custom analyses that create findings.

There is a newer version: 2024.7.2
Show newest version
package eu.cqse.check.framework.scanner;

import org.conqat.lib.commons.collections.ILookahead;

import com.teamscale.wia.TeamscaleIssue;

/**
 * Statement oracle for token representation of work items ({@link TeamscaleIssue} and subclasses).
 * 

* Every token, that is not a {@link ETokenType#isLiteral() literal} denotes the end of a statement. * Literals are the actual values of the fields (e.g. {@link TeamscaleIssue#getSubject()}). This * results in only the literals being detected as statements, everything else is discarded. */ public class WorkItemStatementOracle implements IStatementOracle { @Override public boolean isEndOfStatementTokenType(ETokenType tokenType, ILookahead lookahead) throws X { return isEndOfStatementToken(tokenType); } @Override public boolean isEndOfStatementToken(ETokenType tokenType, ILookahead lookahead) throws X { return isEndOfStatementToken(tokenType); } private static boolean isEndOfStatementToken(ETokenType tokenType) { return !tokenType.isLiteral(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy