/** * Implements the Configurable interface using bean introspection. * * <p>Subclasses are allowed to add behaviour. After the bean * based setup has completed first the method * {@link #finishLocalSetup finishLocalSetup} * is called to allow completion of the bean's local setup, * after that the method {@link #setupChild setupChild} * is called for each {@link Configuration#getChildren child Configuration} * of {@code configuration}. * * @see Configurable */ @Override public final void configure(Configuration config) throws CheckstyleException { configuration = config; final String[] attributes = config.getAttributeNames(); for (final String key : attributes) { final String value = config.getAttribute(key); tryCopyProperty(config.getName(), key, value, true); } finishLocalSetup(); final Configuration[] childConfigs = config.getChildren(); for (final Configuration childConfig : childConfigs) { setupChild(childConfig); } }
/** * Implements the Configurable interface using bean introspection. * * <p>Subclasses are allowed to add behaviour. After the bean * based setup has completed first the method * {@link #finishLocalSetup finishLocalSetup} * is called to allow completion of the bean's local setup, * after that the method {@link #setupChild setupChild} * is called for each {@link Configuration#getChildren child Configuration} * of {@code configuration}. * * @see Configurable */ @Override public final void configure(Configuration config) throws CheckstyleException { configuration = config; final String[] attributes = config.getAttributeNames(); for (final String key : attributes) { final String value = config.getAttribute(key); tryCopyProperty(config.getName(), key, value, true); } finishLocalSetup(); final Configuration[] childConfigs = config.getChildren(); for (final Configuration childConfig : childConfigs) { setupChild(childConfig); } }