Class EnhancedCompositeBeanHelper

java.lang.Object
org.apache.maven.configuration.internal.EnhancedCompositeBeanHelper

public final class EnhancedCompositeBeanHelper extends Object
Optimized version of CompositeBeanHelper with caching for improved performance. This implementation caches method and field lookups to avoid repeated reflection operations.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EnhancedCompositeBeanHelper(org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup lookup, ClassLoader loader, org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator evaluator, org.codehaus.plexus.component.configurator.ConfigurationListener listener)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Clear all caches.
    void
    setDefault(Object bean, Object defaultValue, org.codehaus.plexus.configuration.PlexusConfiguration configuration)
    Calls the default "set" method on the bean; re-converts the configuration if necessary.
    void
    setProperty(Object bean, String propertyName, Class<?> valueType, org.codehaus.plexus.configuration.PlexusConfiguration configuration)
    Sets a property in the bean using cached lookups for improved performance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EnhancedCompositeBeanHelper

      public EnhancedCompositeBeanHelper(org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup lookup, ClassLoader loader, org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator evaluator, org.codehaus.plexus.component.configurator.ConfigurationListener listener)
  • Method Details

    • setDefault

      public void setDefault(Object bean, Object defaultValue, org.codehaus.plexus.configuration.PlexusConfiguration configuration) throws org.codehaus.plexus.component.configurator.ComponentConfigurationException
      Calls the default "set" method on the bean; re-converts the configuration if necessary.
      Throws:
      org.codehaus.plexus.component.configurator.ComponentConfigurationException
    • setProperty

      public void setProperty(Object bean, String propertyName, Class<?> valueType, org.codehaus.plexus.configuration.PlexusConfiguration configuration) throws org.codehaus.plexus.component.configurator.ComponentConfigurationException
      Sets a property in the bean using cached lookups for improved performance.
      Throws:
      org.codehaus.plexus.component.configurator.ComponentConfigurationException
    • clearCaches

      public static void clearCaches()
      Clear all caches. Useful for testing or memory management.