Class ExtensionMetadata


  • @Alpha
    public final class ExtensionMetadata
    extends java.lang.Object
    Metadata that was detected when analyzing an extension class before attaching. Represents a resolved extension type with all config customizers and method handlers.
    Since:
    3.38.0
    • Field Detail

      • extensionType

        private final java.lang.Class<?> extensionType
      • instanceConfigCustomizer

        private final ConfigCustomizer instanceConfigCustomizer
      • methodConfigCustomizers

        private final java.util.Map<java.lang.reflect.Method,​? extends ConfigCustomizer> methodConfigCustomizers
      • methodHandlers

        private final java.util.Map<java.lang.reflect.Method,​ExtensionHandler> methodHandlers
    • Constructor Detail

      • ExtensionMetadata

        private ExtensionMetadata​(java.lang.Class<?> extensionType,
                                  ConfigCustomizer instanceConfigCustomizer,
                                  java.util.Map<java.lang.reflect.Method,​? extends ConfigCustomizer> methodConfigCustomizers,
                                  java.util.Map<java.lang.reflect.Method,​ExtensionHandler> methodHandlers)
    • Method Detail

      • extensionType

        public java.lang.Class<?> extensionType()
      • createInstanceConfiguration

        public ConfigRegistry createInstanceConfiguration​(ConfigRegistry config)
        Create an instance specific configuration based on all instance customizers. The instance configuration holds all custom configuration that was applied e.g. through instance annotations.
        Parameters:
        config - A configuration object. The object is not changed
        Returns:
        A new configuration object with all changes applied
      • createMethodConfiguration

        public ConfigRegistry createMethodConfiguration​(java.lang.reflect.Method method,
                                                        ConfigRegistry config)
        Create an method specific configuration based on all method customizers. The method configuration holds all custom configuration that was applied e.g. through method annotations.
        Parameters:
        method - The method that is about to be called
        config - A configuration object. The object is not changed
        Returns:
        A new configuration object with all changes applied
      • getExtensionMethods

        public java.util.Set<java.lang.reflect.Method> getExtensionMethods()
        Returns a set of all Methods that have ExtensionHandler objects associated with them.