net.fortuna.ical4j.model.ParameterFactoryWrapper.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ical4j Show documentation
Show all versions of ical4j Show documentation
A Java library for reading and writing iCalendar (*.ics) files
package net.fortuna.ical4j.model
import net.fortuna.ical4j.model.ParameterFactory
class ParameterFactoryWrapper extends AbstractFactory {
Class parameterClass
ParameterFactory factory
ParameterFactoryWrapper(Class paramClass, ParameterFactory factory) {
this.parameterClass = paramClass
this.factory = factory
}
@Override
Object newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attributes) throws InstantiationException, IllegalAccessException {
if (FactoryBuilderSupport.checkValueIsTypeNotString(value, name, parameterClass)) {
return value
}
return factory.createParameter((String) value)
}
boolean isLeaf() {
return true
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy