Class DelegatorGenerator

java.lang.Object
com.mchange.v2.codegen.intfc.DelegatorGenerator

public class DelegatorGenerator extends Object
  • Constructor Details

    • DelegatorGenerator

      public DelegatorGenerator()
  • Method Details

    • setGenerateInnerSetter

      public void setGenerateInnerSetter(boolean b)
    • isGenerateInnerSetter

      public boolean isGenerateInnerSetter()
    • setGenerateInnerGetter

      public void setGenerateInnerGetter(boolean b)
    • isGenerateInnerGetter

      public boolean isGenerateInnerGetter()
    • setGenerateNoArgConstructor

      public void setGenerateNoArgConstructor(boolean b)
    • isGenerateNoArgConstructor

      public boolean isGenerateNoArgConstructor()
    • setGenerateWrappingConstructor

      public void setGenerateWrappingConstructor(boolean b)
    • isGenerateWrappingConstructor

      public boolean isGenerateWrappingConstructor()
    • setWrappingConstructorModifiers

      public void setWrappingConstructorModifiers(int modifiers)
    • getWrappingConstructorModifiers

      public int getWrappingConstructorModifiers()
    • setNoArgConstructorModifiers

      public void setNoArgConstructorModifiers(int modifiers)
    • getNoArgConstructorModifiers

      public int getNoArgConstructorModifiers()
    • setMethodModifiers

      public void setMethodModifiers(int modifiers)
    • getMethodModifiers

      public int getMethodModifiers()
    • setClassModifiers

      public void setClassModifiers(int modifiers)
    • getClassModifiers

      public int getClassModifiers()
    • setSuperclass

      public void setSuperclass(Class superclass)
    • getSuperclass

      public Class getSuperclass()
    • setExtraInterfaces

      public void setExtraInterfaces(Class[] extraInterfaces)
    • getExtraInterfaces

      public Class[] getExtraInterfaces()
    • getReflectiveDelegateMethods

      public Method[] getReflectiveDelegateMethods()
    • setReflectiveDelegateMethods

      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.
    • getReflectiveDelegationPolicy

      public ReflectiveDelegationPolicy getReflectiveDelegationPolicy()
    • setReflectiveDelegationPolicy

      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.
    • writeDelegator

      public void writeDelegator(Class intfcl, String genclass, Writer w) throws IOException
      Throws:
      IOException
    • generateDelegateCode

      protected void generateDelegateCode(Class intfcl, String genclass, Method method, IndentedWriter iw) throws IOException
      Throws:
      IOException
    • generateReflectiveDelegateCode

      protected void generateReflectiveDelegateCode(Class intfcl, String genclass, Method method, IndentedWriter iw) throws IOException
      Throws:
      IOException
    • generateBannerComment

      protected void generateBannerComment(IndentedWriter iw) throws IOException
      Throws:
      IOException
    • generateClassJavaDocComment

      protected void generateClassJavaDocComment(IndentedWriter iw) throws IOException
      Throws:
      IOException
    • generateExtraImports

      protected void generateExtraImports(IndentedWriter iw) throws IOException
      Throws:
      IOException
    • generatePreDelegateCode

      protected void generatePreDelegateCode(Class intfcl, String genclass, Method method, IndentedWriter iw) throws IOException
      Throws:
      IOException
    • generatePostDelegateCode

      protected void generatePostDelegateCode(Class intfcl, String genclass, Method method, IndentedWriter iw) throws IOException
      Throws:
      IOException
    • generateExtraDeclarations

      protected void generateExtraDeclarations(Class intfcl, String genclass, IndentedWriter iw) throws IOException
      Throws:
      IOException