Class PackagedPropertyModule<T>
- java.lang.Object
-
- net.sourceforge.pmd.properties.modules.PackagedPropertyModule<T>
-
- Direct Known Subclasses:
MethodPropertyModule
,TypePropertyModule
public abstract class PackagedPropertyModule<T> extends java.lang.Object
Factorises common functionality for packaged properties.- Author:
- Clément Fournier
-
-
Constructor Summary
Constructors Constructor Description PackagedPropertyModule(java.lang.String[] legalPackageNames, java.util.List<T> defaults)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addAttributesTo(java.util.Map<PropertyDescriptorField,java.lang.String> attributes)
protected abstract java.lang.String
itemTypeName()
Returns the name of the type of item.java.lang.String[]
legalPackageNames()
protected abstract java.lang.String
packageNameOf(T item)
Returns the package name of the item.java.lang.String[]
packageNamesIn(java.util.Map<PropertyDescriptorField,java.lang.String> params)
java.lang.String
valueErrorFor(T value)
-
-
-
Constructor Detail
-
PackagedPropertyModule
public PackagedPropertyModule(java.lang.String[] legalPackageNames, java.util.List<T> defaults)
-
-
Method Detail
-
packageNameOf
protected abstract java.lang.String packageNameOf(T item)
Returns the package name of the item.- Parameters:
item
- Item (not null)- Returns:
- Package name of the item
-
valueErrorFor
public java.lang.String valueErrorFor(T value)
-
itemTypeName
protected abstract java.lang.String itemTypeName()
Returns the name of the type of item.- Returns:
- The name of the type of item
-
legalPackageNames
public java.lang.String[] legalPackageNames()
-
addAttributesTo
public void addAttributesTo(java.util.Map<PropertyDescriptorField,java.lang.String> attributes)
-
packageNamesIn
public java.lang.String[] packageNamesIn(java.util.Map<PropertyDescriptorField,java.lang.String> params)
-
-