for (int i = 0; i < classes.length; i++) {
String className = classes[i];
Object adapted = LegacyResourceSupport.getAdapter(element,
className);
if (adapted != null) {
currentDecorator.decorate(adapted, decoration);
}
}
}
else{
if (currentDecorator != null && element != null) {