MyFunc.java: Using custom functions
MyFunc.java is created when you use the --kast-library option for kwcreatechecker.
MyFunc.java contains sample plug-in source:
public class MyFunc extends com.klocwork.jxpath.CustomBoolFunction { public boolean evaluate(com.klocwork.javaapi.jtree.TreeNode node) { return true; } }
Update this file with your own plug-in source. If you replace the default class name, "MyFunc", with another name, you will need to update the class in plugin_functions.xml. See plugin_functions.xml: Using custom functions.
An updateVersion.xsl file is also created for Java KAST checkers with custom functions. This file is for versioning purposes for the Java KAST API as it relates to custom functions.