Enum ExtensionFactory.FactoryFlag

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DONT_USE_PROXY
      Do not wrap the backing object methods into ExtensionHandler instances and return a Proxy instance but return it as is.
      NON_VIRTUAL_FACTORY
      The factory provides a concrete instance to back the extension type.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private FactoryFlag()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ExtensionFactory.FactoryFlag valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ExtensionFactory.FactoryFlag[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • NON_VIRTUAL_FACTORY

        public static final ExtensionFactory.FactoryFlag NON_VIRTUAL_FACTORY
        The factory provides a concrete instance to back the extension type.
        Unless this flag is present, factories do not create an object to attach to but register method handlers for every method on an extension type.
        E.g. the SQLObject handler is an example of a virtual factory that processes every method in an interface class without requiring an implementation of the extension type. The extension framework will execute the method handlers and pass in a proxy object instead of an underlying instance.
        When this flag is present, the ExtensionFactory.attach(Class, HandleSupplier) method will never be called.
      • DONT_USE_PROXY

        public static final ExtensionFactory.FactoryFlag DONT_USE_PROXY
        Do not wrap the backing object methods into ExtensionHandler instances and return a Proxy instance but return it as is. This allows the factory to suport class objects as well as interfaces.
        This is a corner use case and should normally not be used by any standard extension.
        Legacy extension factories that need every method on an interface forwarded to the underlying implementation class can set this flag to bypass the proxy logic of the extension framework.
    • Constructor Detail

      • FactoryFlag

        private FactoryFlag()
    • Method Detail

      • values

        public static ExtensionFactory.FactoryFlag[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ExtensionFactory.FactoryFlag c : ExtensionFactory.FactoryFlag.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ExtensionFactory.FactoryFlag valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null