Class TypeIsFunction

  • All Implemented Interfaces:
    org.jaxen.Function

    public class TypeIsFunction
    extends java.lang.Object
    implements org.jaxen.Function
    • Constructor Summary

      Constructors 
      Constructor Description
      TypeIsFunction()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object call​(org.jaxen.Context context, java.util.List args)  
      static void registerSelfInSimpleContext()  
      static boolean typeIs​(net.sourceforge.pmd.lang.ast.Node n, java.lang.String fullTypeName)
      Example XPath 1.0: //ClassOrInterfaceType[typeIs('java.lang.String')]
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TypeIsFunction

        public TypeIsFunction()
    • Method Detail

      • registerSelfInSimpleContext

        public static void registerSelfInSimpleContext()
      • call

        public java.lang.Object call​(org.jaxen.Context context,
                                     java.util.List args)
                              throws org.jaxen.FunctionCallException
        Specified by:
        call in interface org.jaxen.Function
        Throws:
        org.jaxen.FunctionCallException
      • typeIs

        public static boolean typeIs​(net.sourceforge.pmd.lang.ast.Node n,
                                     java.lang.String fullTypeName)
        Example XPath 1.0: //ClassOrInterfaceType[typeIs('java.lang.String')]

        Example XPath 2.0: //ClassOrInterfaceType[pmd-java:typeIs('java.lang.String')]

        Parameters:
        n - The node on which to check for types
        fullTypeName - The fully qualified name of the class or any supertype
        Returns:
        True if the type of the node matches, false otherwise.