public abstract class ProxettaBuilder
extends java.lang.Object
Proxetta only holds aspects and
configuration, ProxettaBuilder deals with the
actually building proxies and wrappers over provided target.| Modifier and Type | Field and Description |
|---|---|
protected jodd.asm5.ClassWriter |
destClassWriter |
protected Proxetta |
proxetta |
protected boolean |
proxyApplied |
protected java.lang.String |
proxyClassName |
protected java.lang.String |
requestedProxyClassName
Requested proxy class name (or class name template).
|
protected static int |
suffixCounter
Number appended to proxy class name, incremented on each use to make classnames unique
in the system (e.g. classloader).
|
| Modifier | Constructor and Description |
|---|---|
protected |
ProxettaBuilder(Proxetta proxetta)
Creates new builder.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkAccepted()
Checks if proxy is created and throws an exception if not.
|
byte[] |
create()
Returns byte array of created class.
|
java.lang.Class |
define()
Defines class.
|
protected void |
dumpClass(byte[] bytes)
Writes created class content to output folder for debugging purposes.
|
java.lang.String |
getProxyClassName()
Returns proxy class name.
|
boolean |
isProxyApplied()
Returns
true if at least one method was wrapped. |
java.lang.Object |
newInstance()
Creates new instance of created class.
|
protected void |
process()
Reads the target and creates destination class.
|
protected abstract WorkData |
process(jodd.asm5.ClassReader cr,
TargetClassInfoReader targetClassInfoReader)
Creates custom class builder and process the target class with it.
|
protected java.lang.String |
resolveClassNameSuffix()
Returns new suffix or
null if suffix is not in use. |
protected void |
setTarget(java.lang.Class target)
Defines class as a target.
|
protected void |
setTarget(java.io.InputStream target)
Defines class input stream as a target.
|
protected void |
setTarget(java.lang.String targetName)
Defines class name as a target.
|
void |
setTargetProxyClassName(java.lang.String targetProxyClassName)
Sets requested proxy class name.
|
protected byte[] |
toByteArray()
Returns raw bytecode.
|
protected final Proxetta proxetta
protected java.lang.String requestedProxyClassName
protected static int suffixCounter
Proxetta.setVariableClassName(boolean)protected jodd.asm5.ClassWriter destClassWriter
protected boolean proxyApplied
protected java.lang.String proxyClassName
protected ProxettaBuilder(Proxetta proxetta)
public void setTargetProxyClassName(java.lang.String targetProxyClassName)
protected void setTarget(java.io.InputStream target)
protected void setTarget(java.lang.String targetName)
protected void setTarget(java.lang.Class target)
protected java.lang.String resolveClassNameSuffix()
null if suffix is not in use.protected abstract WorkData process(jodd.asm5.ClassReader cr, TargetClassInfoReader targetClassInfoReader)
protected void process()
public byte[] create()
public java.lang.Class define()
public java.lang.Object newInstance()
protected void dumpClass(byte[] bytes)
protected void checkAccepted()
protected byte[] toByteArray()
public boolean isProxyApplied()
true if at least one method was wrapped.public java.lang.String getProxyClassName()
Copyright © 2003-2013 Jodd Team