Class Unwrapper<EnhancementT>

java.lang.Object
aas_core.aas3_0.enhancing.Unwrapper<EnhancementT>
Type Parameters:
EnhancementT - structure of the expected enhancement
Direct Known Subclasses:
Enhancer

public class Unwrapper<EnhancementT> extends Object
Unwrap enhancements from the wrapped instances.
  • Constructor Details

    • Unwrapper

      public Unwrapper()
  • Method Details

    • unwrap

      public Optional<EnhancementT> unwrap(IClass that)
      Unwrap the given model instance.
      Parameters:
      that - model instance to be unwrapped
      Returns:
      Enhancement, or Optional.empty() if that has not been wrapped yet.
    • mustUnwrap

      public EnhancementT mustUnwrap(IClass that)
      Unwrap the given model instance.
      Parameters:
      that - model instance to be unwrapped
      Returns:
      Enhancement wrapped around that