Package net.sourceforge.pmd.lang
Class JvmLanguagePropertyBundle
- java.lang.Object
-
- net.sourceforge.pmd.properties.AbstractPropertySource
-
- net.sourceforge.pmd.lang.LanguagePropertyBundle
-
- net.sourceforge.pmd.lang.JvmLanguagePropertyBundle
-
- All Implemented Interfaces:
PropertySource
public class JvmLanguagePropertyBundle extends LanguagePropertyBundle
Base properties class for JVM languages that use a classpath to resolve references. This contributes the "auxClasspath" property.- Author:
- Clément Fournier
-
-
Field Summary
Fields Modifier and Type Field Description static PropertyDescriptor<String>
AUX_CLASSPATH
-
Fields inherited from class net.sourceforge.pmd.lang.LanguagePropertyBundle
LANGUAGE_VERSION, SUPPRESS_MARKER
-
-
Constructor Summary
Constructors Constructor Description JvmLanguagePropertyBundle(Language language)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull ClassLoader
getAnalysisClassLoader()
Returns the classloader to use to resolve classes for this language.void
setClassLoader(ClassLoader classLoader)
Set the classloader to use for analysis.<T> void
setProperty(PropertyDescriptor<T> propertyDescriptor, T value)
Set the property value specified.-
Methods inherited from class net.sourceforge.pmd.lang.LanguagePropertyBundle
getLanguage, getLanguageVersion, getName, getPropertySourceType, getSuppressMarker, setLanguageVersion
-
Methods inherited from class net.sourceforge.pmd.properties.AbstractPropertySource
definePropertyDescriptor, equals, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, hashCode, isPropertyOverridden
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sourceforge.pmd.properties.PropertySource
dysfunctionReason
-
-
-
-
Field Detail
-
AUX_CLASSPATH
public static final PropertyDescriptor<String> AUX_CLASSPATH
-
-
Constructor Detail
-
JvmLanguagePropertyBundle
public JvmLanguagePropertyBundle(Language language)
-
-
Method Detail
-
setProperty
public <T> void setProperty(PropertyDescriptor<T> propertyDescriptor, T value)
Description copied from interface:PropertySource
Set the property value specified. This is also referred to as "overriding" the (default) value of a property.- Specified by:
setProperty
in interfacePropertySource
- Overrides:
setProperty
in classAbstractPropertySource
- Type Parameters:
T
- The underlying type of the property descriptor.- Parameters:
propertyDescriptor
- The property descriptor.value
- The value to set.
-
setClassLoader
public void setClassLoader(ClassLoader classLoader)
Set the classloader to use for analysis. This overrides the setting of a classpath as a string viasetProperty(PropertyDescriptor, Object)
. If the parameter is null, the classloader returned bygetAnalysisClassLoader()
is constructed from the value of theauxClasspath
property.
-
getAnalysisClassLoader
public @NonNull ClassLoader getAnalysisClassLoader()
Returns the classloader to use to resolve classes for this language.
-
-