Class ParserOptions


  • public class ParserOptions
    extends Object
    Represents a set of configuration options for a Parser. For each unique combination of ParserOptions a Parser will be used to create an AST. Therefore, implementations must implement Object.equals(Object) and Object.hashCode().
    • Constructor Detail

      • ParserOptions

        public ParserOptions()
      • ParserOptions

        public ParserOptions​(String languageId)
    • Method Detail

      • getSuppressMarker

        public String getSuppressMarker()
      • setSuppressMarker

        public final void setSuppressMarker​(@NonNull String suppressMarker)
      • defineProperty

        protected final void defineProperty​(PropertyDescriptor<?> propertyDescriptor)
      • defineProperty

        protected final <T> void defineProperty​(PropertyDescriptor<T> propertyDescriptor,
                                                T initialValue)
      • setProperty

        protected final <T> void setProperty​(PropertyDescriptor<T> propertyDescriptor,
                                             T initialValue)
      • getProperty

        public final <T> T getProperty​(PropertyDescriptor<T> propertyDescriptor)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • overridePropertiesFromEnv

        protected final void overridePropertiesFromEnv()
        Overrides the default PropertyDescriptors with values found in environment variables. TODO: Move this to net.sourceforge.pmd.PMD#parserFor when CLI options are implemented