Interface GssFunction
-
- All Known Implementing Classes:
GssFunctions.AddHsbToCssColor,GssFunctions.AddToNumericValue,GssFunctions.AdjustBrightness,GssFunctions.BaseBlendColors,GssFunctions.BlendColorsHsb,GssFunctions.BlendColorsRgb,GssFunctions.Concat,GssFunctions.Darken,GssFunctions.DesaturateColor,GssFunctions.Div,GssFunctions.Greyscale,GssFunctions.Lighten,GssFunctions.MakeContrastingColor,GssFunctions.MakeMutedColor,GssFunctions.MakeTranslucent,GssFunctions.MaxValue,GssFunctions.MinValue,GssFunctions.Mult,GssFunctions.SaturateColor,GssFunctions.SelectFrom,GssFunctions.Spin,GssFunctions.SubtractFromNumericValue
public interface GssFunctionEncapsulates a custom function callable from GSS stylesheet files.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<CssValueNode>getCallResultNodes(java.util.List<CssValueNode> args, ErrorManager errorManager)Processes a list of function call arguments and returns a list of CssNodes representing this call's output, which replace the input nodes in the AST.java.lang.StringgetCallResultString(java.util.List<java.lang.String> args)Processes a list of strings as function arguments and returns a string result.java.lang.IntegergetNumExpectedArguments()Returns the number of parsed arguments that this function takes, ornullif the number of arguments may vary.
-
-
-
Method Detail
-
getNumExpectedArguments
java.lang.Integer getNumExpectedArguments()
Returns the number of parsed arguments that this function takes, ornullif the number of arguments may vary.
-
getCallResultNodes
java.util.List<CssValueNode> getCallResultNodes(java.util.List<CssValueNode> args, ErrorManager errorManager) throws GssFunctionException
Processes a list of function call arguments and returns a list of CssNodes representing this call's output, which replace the input nodes in the AST. Errors will be reported to the ErrorManager.- Throws:
GssFunctionException
-
getCallResultString
java.lang.String getCallResultString(java.util.List<java.lang.String> args) throws GssFunctionExceptionProcesses a list of strings as function arguments and returns a string result. Errors are reported by throwingGssFunctionException.- Throws:
GssFunctionException
-
-