Package jodd.pathref
Class Pathref<C>
- java.lang.Object
-
- jodd.pathref.Pathref<C>
-
public class Pathref<C> extends java.lang.Object
Super tool for getting calling path reference in compile-time.
-
-
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()
-
-
-
Field Detail
-
ALL
public static final int ALL
- See Also:
- Constant Field Values
-
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
-
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()
-
-