Package jodd.pathref

Class Pathref<C>


  • public class Pathref<C>
    extends java.lang.Object
    Super tool for getting calling path reference in compile-time.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALL  
      static jodd.util.TypeCache<java.lang.Class> cache  
      protected java.lang.String path  
    • Constructor Summary

      Constructors 
      Constructor Description
      Pathref​(java.lang.Class<C> target)
      Creates new proxified instance of target.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void append​(java.lang.String methodName)
      Appends method name to existing path.
      protected C createProxyObject​(java.lang.Class<C> target)
      Creates proxy object.
      protected static void injectPathRef​(Pathref pathref, java.lang.Object target)  
      static <T> Pathref<T> of​(java.lang.Class<T> target)
      Static factory, for convenient use.
      java.lang.String path()  
      java.lang.String path​(java.util.function.Consumer<C> consumer)  
      C proxy()  
      • Methods inherited from class java.lang.Object

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

      • cache

        public static jodd.util.TypeCache<java.lang.Class> cache
      • path

        protected java.lang.String path
    • Constructor Detail

      • Pathref

        public Pathref​(java.lang.Class<C> target)
        Creates new proxified instance of target. Proxy instances are cached. If given target is also proxified, it's real target will be used.
    • Method Detail

      • createProxyObject

        protected C createProxyObject​(java.lang.Class<C> target)
        Creates proxy object.
      • append

        protected void append​(java.lang.String methodName)
        Appends method name to existing path.
      • of

        public static <T> Pathref<T> of​(java.lang.Class<T> target)
        Static factory, for convenient use.
      • path

        public java.lang.String path​(java.util.function.Consumer<C> consumer)
      • injectPathRef

        protected static void injectPathRef​(Pathref pathref,
                                            java.lang.Object target)
      • proxy

        public C proxy()
      • path

        public java.lang.String path()