Constructor allows attribute->property mapping to be overriden.
Two arrays are passed in.
One contains the attribute names and the other the property names.
The attribute name / property name pairs are match by position
In order words, the first string in the attribute name list matches
to the first string in the property name list and so on.
If a property name is null or the attribute name has no matching
property name, then this indicates that the attibute should be ignored.
Example One
The following constructs a rule that maps the alt-city
attribute to the city property and the alt-state
to the state property.
All other attributes are mapped as usual using exact name matching.
SetPropertiesRule(
new String[] {"alt-city", "alt-state"},
new String[] {"city", "state"});
Example Two
The following constructs a rule that maps the class
attribute to the className property.
The attribute ignore-me is not mapped.
All other attributes are mapped as usual using exact name matching.
SetPropertiesRule(
new String[] {"class", "ignore-me"},
new String[] {"className"});
Parameters: attributeNames - names of attributes to map Parameters: propertyNames - names of properties mapped to |