Top Fields Constructors Methods
com.mchange.v2.codegen.intfc

public Class DelegatorGenerator

extends Object
Class Inheritance
Imports
java.io.*, java.util.*, java.lang.reflect.*, com.mchange.v2.codegen.*, com.mchange.v1.lang.ClassUtils

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv static final Comparator<T>
pack-priv boolean
pack-priv int
pack-priv Class<T>[]
pack-priv boolean
pack-priv boolean
pack-priv int
pack-priv Method[]
pack-priv ReflectiveDelegationPolicy
pack-priv Class<T>
pack-priv boolean
pack-priv int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
ensureImports(String genclass, Set<E> imports, Method[] methods)

protected void
generateBannerComment(IndentedWriter iw)
Deprecated as a consequence of IndentedWriter being deprecated.

protected void
generateClassJavaDocComment(IndentedWriter iw)
Deprecated as a consequence of IndentedWriter being deprecated.

protected void
generateDelegateCode(Class<T> intfcl, String genclass, Method method, IndentedWriter iw)
Deprecated as a consequence of IndentedWriter being deprecated.

protected void
generateExtraDeclarations(Class<T> intfcl, String genclass, IndentedWriter iw)
Deprecated as a consequence of IndentedWriter being deprecated.

protected void
generateExtraImports(IndentedWriter iw)
Deprecated as a consequence of IndentedWriter being deprecated.

protected void
generatePostDelegateCode(Class<T> intfcl, String genclass, Method method, IndentedWriter iw)
Deprecated as a consequence of IndentedWriter being deprecated.

protected void
generatePreDelegateCode(Class<T> intfcl, String genclass, Method method, IndentedWriter iw)
Deprecated as a consequence of IndentedWriter being deprecated.

protected void
generateReflectiveDelegateCode(Class<T> intfcl, String genclass, Method method, IndentedWriter iw)
Deprecated as a consequence of IndentedWriter being deprecated.

public int
public Class<T>[]
public int
public int
public Method[]
public ReflectiveDelegationPolicy
public Class<T>
public int
public boolean
public boolean
public boolean
public boolean
public void
setClassModifiers(int modifiers)

public void
setExtraInterfaces(Class<T>[] extraInterfaces)

public void
public void
public void
public void
public void
setMethodModifiers(int modifiers)

public void
public void
setReflectiveDelegateMethods(Method[] reflectiveDelegateMethods)

Reflectively delegated methods are methods that are not declared in the interface at build time, but that should reflectively be forwarded at runtime to the inner delegate.

public void
setReflectiveDelegationPolicy(ReflectiveDelegationPolicy reflectiveDelegationPolicy)

If ReflectiveDelegationPolicy.USE_MAIN_DELEGATE_INTERFACE, delegate via the same interface we are generating methods against.

public void
setSuperclass(Class<T> superclass)

public void
public void
writeDelegator(Class<T> intfcl, String genclass, Writer w)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

class_modifiersback to summary
pack-priv int class_modifiers
classCompback to summary
pack-priv static final Comparator<T> classComp
default_constructorback to summary
pack-priv boolean default_constructor
default_ctor_modifiersback to summary
pack-priv int default_ctor_modifiers
extraInterfacesback to summary
pack-priv Class<T>[] extraInterfaces
inner_getterback to summary
pack-priv boolean inner_getter
inner_setterback to summary
pack-priv boolean inner_setter
method_modifiersback to summary
pack-priv int method_modifiers
reflectiveDelegateMethodsback to summary
pack-priv Method[] reflectiveDelegateMethods
reflectiveDelegationPolicyback to summary
pack-priv ReflectiveDelegationPolicy reflectiveDelegationPolicy
superclassback to summary
pack-priv Class<T> superclass
wrapping_constructorback to summary
pack-priv boolean wrapping_constructor
wrapping_ctor_modifiersback to summary
pack-priv int wrapping_ctor_modifiers

Constructor Detail

DelegatorGeneratorback to summary
public DelegatorGenerator()

Method Detail

ensureImportsback to summary
private void ensureImports(String genclass, Set<E> imports, Method[] methods)
generateBannerCommentback to summary
protected void generateBannerComment(IndentedWriter iw) throws IOException

Deprecated

as a consequence of IndentedWriter being deprecated. See corresponding docs for further information.

generateClassJavaDocCommentback to summary
protected void generateClassJavaDocComment(IndentedWriter iw) throws IOException

Deprecated

as a consequence of IndentedWriter being deprecated. See corresponding docs for further information.

generateDelegateCodeback to summary
protected void generateDelegateCode(Class<T> intfcl, String genclass, Method method, IndentedWriter iw) throws IOException

Deprecated

as a consequence of IndentedWriter being deprecated. See corresponding docs for further information.

generateExtraDeclarationsback to summary
protected void generateExtraDeclarations(Class<T> intfcl, String genclass, IndentedWriter iw) throws IOException

Deprecated

as a consequence of IndentedWriter being deprecated. See corresponding docs for further information.

generateExtraImportsback to summary
protected void generateExtraImports(IndentedWriter iw) throws IOException

Deprecated

as a consequence of IndentedWriter being deprecated. See corresponding docs for further information.

generatePostDelegateCodeback to summary
protected void generatePostDelegateCode(Class<T> intfcl, String genclass, Method method, IndentedWriter iw) throws IOException

Deprecated

as a consequence of IndentedWriter being deprecated. See corresponding docs for further information.

generatePreDelegateCodeback to summary
protected void generatePreDelegateCode(Class<T> intfcl, String genclass, Method method, IndentedWriter iw) throws IOException

Deprecated

as a consequence of IndentedWriter being deprecated. See corresponding docs for further information.

generateReflectiveDelegateCodeback to summary
protected void generateReflectiveDelegateCode(Class<T> intfcl, String genclass, Method method, IndentedWriter iw) throws IOException

Deprecated

as a consequence of IndentedWriter being deprecated. See corresponding docs for further information.

getClassModifiersback to summary
public int getClassModifiers()
getExtraInterfacesback to summary
public Class<T>[] getExtraInterfaces()
getMethodModifiersback to summary
public int getMethodModifiers()
getNoArgConstructorModifiersback to summary
public int getNoArgConstructorModifiers()
getReflectiveDelegateMethodsback to summary
public Method[] getReflectiveDelegateMethods()
getReflectiveDelegationPolicyback to summary
public ReflectiveDelegationPolicy getReflectiveDelegationPolicy()
getSuperclassback to summary
public Class<T> getSuperclass()
getWrappingConstructorModifiersback to summary
public int getWrappingConstructorModifiers()
isGenerateInnerGetterback to summary
public boolean isGenerateInnerGetter()
isGenerateInnerSetterback to summary
public boolean isGenerateInnerSetter()
isGenerateNoArgConstructorback to summary
public boolean isGenerateNoArgConstructor()
isGenerateWrappingConstructorback to summary
public boolean isGenerateWrappingConstructor()
setClassModifiersback to summary
public void setClassModifiers(int modifiers)
setExtraInterfacesback to summary
public void setExtraInterfaces(Class<T>[] extraInterfaces)
setGenerateInnerGetterback to summary
public void setGenerateInnerGetter(boolean b)
setGenerateInnerSetterback to summary
public void setGenerateInnerSetter(boolean b)
setGenerateNoArgConstructorback to summary
public void setGenerateNoArgConstructor(boolean b)
setGenerateWrappingConstructorback to summary
public void setGenerateWrappingConstructor(boolean b)
setMethodModifiersback to summary
public void setMethodModifiers(int modifiers)
setNoArgConstructorModifiersback to summary
public void setNoArgConstructorModifiers(int modifiers)
setReflectiveDelegateMethodsback to summary
public void setReflectiveDelegateMethods(Method[] reflectiveDelegateMethods)

Reflectively delegated methods are methods that are not declared in the interface at build time, but that should reflectively be forwarded at runtime to the inner delegate. This permits support of public methods not exposed via the interface, or support of methods added to versions of the interface newer than the build version. Note that the declaring class of these methods is simply ignored. Methods will ve delegated solely by name and parameter.

setReflectiveDelegationPolicyback to summary
public void setReflectiveDelegationPolicy(ReflectiveDelegationPolicy reflectiveDelegationPolicy)

If ReflectiveDelegationPolicy.USE_MAIN_DELEGATE_INTERFACE, delegate via the same interface we are generating methods against. (This is useful for supporting methods in versions of the interface with methods that don't appear in the version we are generating against.) If ReflectiveDelegationPolicy.USE_RUNTIME_CLASS, delegate via the runtime class of the delegate. (This is useful if the methods come from multiple interfaces, or we want to be able to forward to methods of the delegate class not captured by an interface. Otherwise, use the delegateClass set in the constructor of ReflectiveDelegationPolicy. Note that if the delegate class is not public or otherwise accessible to the generated proxy, IllegalAccessExceptions may ensue.

setSuperclassback to summary
public void setSuperclass(Class<T> superclass)
setWrappingConstructorModifiersback to summary
public void setWrappingConstructorModifiers(int modifiers)
writeDelegatorback to summary
public void writeDelegator(Class<T> intfcl, String genclass, Writer w) throws IOException