Class Aspects


  • public class Aspects
    extends java.lang.Object
    Minute library to do some aspect oriented programming without dragging in the world. Should not be used for high performance things.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  Aspects.InterceptBuilder<T>
      A builder to create a proxy that delegates to another object but can intercept calls, put something before, after and around calls.
      static class  Aspects.Invocation  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.Object DEFAULT  
      static java.lang.Object NORETURN  
    • Constructor Summary

      Constructors 
      Constructor Description
      Aspects()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> Aspects.InterceptBuilder<T> intercept​(java.lang.Class<T> type, T delegate)
      Create an intercepting proxy using a builder
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NORETURN

        public static final java.lang.Object NORETURN
      • DEFAULT

        public static final java.lang.Object DEFAULT
    • Constructor Detail

      • Aspects

        public Aspects()
    • Method Detail

      • intercept

        public static <T> Aspects.InterceptBuilder<T> intercept​(java.lang.Class<T> type,
                                                                T delegate)
        Create an intercepting proxy using a builder
        Parameters:
        type - the type of the proxy
        delegate - the delegate to delegate to
        Returns:
        a builder