Interface DynamicType.Unloaded<T>

Type Parameters:
T - The most specific known loaded type that is implemented by this dynamic type, usually the type itself, an interface or the direct super class.
All Superinterfaces:
DynamicType
All Known Implementing Classes:
DynamicType.Default.Unloaded
Enclosing interface:
DynamicType

public static interface DynamicType.Unloaded<T> extends DynamicType
A dynamic type that has not yet been loaded by a given ClassLoader.
  • Method Details

    • load

      Attempts to load this dynamic type including all of its auxiliary types, if any. If the class loader is an unsealed instance of InjectionClassLoader, the classes are injected directy into the class loader, otherwise, a new class loader is created where the supplied class loader is set as parent.

      Note: A new class is attempted to be loaded each time this method is invoked, even if a compatible class was created previously. Consider using a TypeCache.

      Parameters:
      classLoader - The class loader to use for this class loading or null for using the boot loader.
      Returns:
      This dynamic type in its loaded state.
    • load

      <S extends ClassLoader> DynamicType.Loaded<T> load(@MaybeNull S classLoader, ClassLoadingStrategy<? super S> classLoadingStrategy)

      Attempts to load this dynamic type including all of its auxiliary types, if any.

      Note: A new class is attempted to be loaded each time this method is invoked, even if a compatible class was created previously. Consider using a TypeCache.

      Type Parameters:
      S - The least specific type of class loader this strategy can apply to.
      Parameters:
      classLoader - The class loader to use for this class loading.
      classLoadingStrategy - The class loader strategy which should be used for this class loading.
      Returns:
      This dynamic type in its loaded state.
      See Also:
    • include

      DynamicType.Unloaded<T> include(DynamicType... dynamicType)
      Includes the provided dynamic types as auxiliary types of this instance.
      Parameters:
      dynamicType - The dynamic types to include.
      Returns:
      A copy of this unloaded dynamic type which includes the provided dynamic types.
    • include

      DynamicType.Unloaded<T> include(List<? extends DynamicType> dynamicTypes)
      Includes the provided dynamic types as auxiliary types of this instance.
      Parameters:
      dynamicTypes - The dynamic types to include.
      Returns:
      A copy of this unloaded dynamic type which includes the provided dynamic types.