Package 

Class BaseParsingHelper

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final LanguageVersion defaultVersion
      private final LanguageVersionHandler defaultHandler
    • Method Summary

      Modifier and Type Method Description
      final LanguageVersion getVersion(String version) Returns the language version with the given version string.
      final Self withDefaultVersion(String version) Returns an instance of Self for which all parsing methods default their language version to the provided version If the version is null, then the default language version defined by the language module is used instead.
      final Self withResourceContext(Class<?> contextClass, String resourcePrefix) Returns an instance of Self for which parseResource uses the provided contextClass and resourcePrefix to load resources.
      final Self withParserOptions(ParserOptions parserOptions) Returns an instance of Self for which the parse methods use the provided parserOptions.
      final LanguageVersionHandler getHandler(String version)
      final <R extends Node> List<R> getNodes(Class<R> target, String source, String version)
      T parse(String sourceCode, String version) Parses the sourceCode with the given version.
      T parseResource(String resource, String version) Fetches and parses the resource using the context defined for this instance (by default uses this class' classloader, but can be configured with withResourceContext).
      T parseClass(Class<?> clazz, String version) Fetches the source of the given clazz.
      final LanguageVersion getDefaultVersion()
      final LanguageVersionHandler getDefaultHandler()
      • Methods inherited from class net.sourceforge.pmd.lang.ast.test.BaseParsingHelper

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait