Class HCJSNodeDetector


  • @NotThreadSafe
    public final class HCJSNodeDetector
    extends Object
    This class is used to determine the special nodes (JS and CSS, inline and reference).
    Author:
    Philip Helger
    • Method Detail

      • isJSNode

        public static boolean isJSNode​(@Nullable
                                       IHCNode aNode)
        Check if the passed node is a JS node after unwrapping.
        Parameters:
        aNode - The node to be checked - may be null.
        Returns:
        true if the node implements IHCScript.
      • isDirectJSNode

        public static boolean isDirectJSNode​(@Nullable
                                             IHCNode aNode)
        Check if the passed node is a JS node.
        Parameters:
        aNode - The node to be checked - may be null.
        Returns:
        true if the node implements IHCScript.
      • isJSInlineNode

        public static boolean isJSInlineNode​(@Nullable
                                             IHCNode aNode)
        Check if the passed node is an inline JS node after unwrapping.
        Parameters:
        aNode - The node to be checked - may be null.
        Returns:
        true if the node implements HCScriptInline.
      • isDirectJSInlineNode

        public static boolean isDirectJSInlineNode​(@Nullable
                                                   IHCNode aNode)
        Check if the passed node is an inline JS node.
        Parameters:
        aNode - The node to be checked - may be null.
        Returns:
        true if the node implements IHCScriptInline .
      • isJSFileNode

        public static boolean isJSFileNode​(@Nullable
                                           IHCNode aNode)
        Check if the passed node is a file JS node after unwrapping.
        Parameters:
        aNode - The node to be checked - may be null.
        Returns:
        true if the node implements HCScriptFile.
      • isDirectJSFileNode

        public static boolean isDirectJSFileNode​(@Nullable
                                                 IHCNode aNode)
        Check if the passed node is a file JS node.
        Parameters:
        aNode - The node to be checked - may be null.
        Returns:
        true if the node implements HCScriptFile.