static void genclass( DelegatorGenerator dg, Class intfcl, String fqcn, File srcroot ) throws IOException { File genDir = new File( srcroot, dirForFqcn( fqcn ) ); if (! genDir.exists() ) { System.err.println( JdbcProxyGenerator.class.getName() + " -- creating directory: " + genDir.getAbsolutePath() ); genDir.mkdirs(); } String fileName = CodegenUtils.fqcnLastElement( fqcn ) + ".java"; Writer w = null; try { w = new BufferedWriter( new FileWriter( new File( genDir, fileName ) ) ); dg.writeDelegator( intfcl, fqcn, w ); w.flush(); System.err.println("Generated " + fileName); } finally { try { if (w != null) w.close(); } catch ( Exception e ) { e.printStackTrace(); } } }
static void genclass( DelegatorGenerator dg, Class intfcl, String fqcn, File srcroot ) throws IOException { File genDir = new File( srcroot, dirForFqcn( fqcn ) ); if (! genDir.exists() ) { System.err.println( JdbcProxyGenerator.class.getName() + " -- creating directory: " + genDir.getAbsolutePath() ); genDir.mkdirs(); } String fileName = CodegenUtils.fqcnLastElement( fqcn ) + ".java"; Writer w = null; try { w = new BufferedWriter( new FileWriter( new File( genDir, fileName ) ) ); dg.writeDelegator( intfcl, fqcn, w ); w.flush(); System.err.println("Generated " + fileName); } finally { try { if (w != null) w.close(); } catch ( Exception e ) { e.printStackTrace(); } } }
String sgc = CodegenUtils.fqcnLastElement( genclass ); String scn = (superclass != null ? ClassUtils.simpleClassName( superclass ) : null); String sin = ClassUtils.simpleClassName( intfcl );
String sgc = CodegenUtils.fqcnLastElement( genclass ); String scn = (superclass != null ? ClassUtils.simpleClassName( superclass ) : null); String sin = ClassUtils.simpleClassName( intfcl );
protected void generateExtraDeclarations( Class intfcl, String genclass, IndentedWriter iw ) throws IOException { super.generateExtraDeclarations( intfcl, genclass, iw ); iw.println(); iw.println("NewProxyConnection proxyCon;"); iw.println(); iw.print( CodegenUtils.fqcnLastElement( genclass ) ); iw.println("( " + CodegenUtils.simpleClassName( intfcl ) + " inner, NewPooledConnection parentPooledConnection, NewProxyConnection proxyCon )"); iw.println("{"); iw.upIndent(); iw.println("this( inner, parentPooledConnection );"); iw.println("this.proxyCon = proxyCon;"); iw.downIndent(); iw.println("}"); } }
protected void generateExtraDeclarations( Class intfcl, String genclass, IndentedWriter iw ) throws IOException { super.generateExtraDeclarations( intfcl, genclass, iw ); iw.println(); iw.println("NewProxyConnection proxyCon;"); iw.println(); iw.print( CodegenUtils.fqcnLastElement( genclass ) ); iw.println("( " + CodegenUtils.simpleClassName( intfcl ) + " inner, NewPooledConnection parentPooledConnection, NewProxyConnection proxyCon )"); iw.println("{"); iw.upIndent(); iw.println("this( inner, parentPooledConnection );"); iw.println("this.proxyCon = proxyCon;"); iw.downIndent(); iw.println("}"); } }
protected void generateExtraDeclarations( Class intfcl, String genclass, IndentedWriter iw ) throws IOException { super.generateExtraDeclarations( intfcl, genclass, iw ); iw.println(); iw.println("Object creator;"); iw.println("Object creatorProxy;"); iw.println("NewProxyConnection proxyConn;"); iw.println(); iw.print( CodegenUtils.fqcnLastElement( genclass ) ); iw.println("( " + CodegenUtils.simpleClassName( intfcl ) + " inner, NewPooledConnection parentPooledConnection, Object c, Object cProxy )"); iw.println("{"); iw.upIndent(); iw.println("this( inner, parentPooledConnection );"); iw.println("this.creator = c;"); iw.println("this.creatorProxy = cProxy;"); iw.println("if (creatorProxy instanceof NewProxyConnection) this.proxyConn = (NewProxyConnection) cProxy;"); iw.downIndent(); iw.println("}"); }
protected void generateExtraDeclarations( Class intfcl, String genclass, IndentedWriter iw ) throws IOException { super.generateExtraDeclarations( intfcl, genclass, iw ); iw.println(); iw.println("Object creator;"); iw.println("Object creatorProxy;"); iw.println("NewProxyConnection proxyConn;"); iw.println(); iw.print( CodegenUtils.fqcnLastElement( genclass ) ); iw.println("( " + CodegenUtils.simpleClassName( intfcl ) + " inner, NewPooledConnection parentPooledConnection, Object c, Object cProxy )"); iw.println("{"); iw.upIndent(); iw.println("this( inner, parentPooledConnection );"); iw.println("this.creator = c;"); iw.println("this.creatorProxy = cProxy;"); iw.println("if (creatorProxy instanceof NewProxyConnection) this.proxyConn = (NewProxyConnection) cProxy;"); iw.downIndent(); iw.println("}"); }
String sgc = CodegenUtils.fqcnLastElement( genclass ); String scn = (superclass != null ? ClassUtils.simpleClassName( superclass ) : null); String sin = ClassUtils.simpleClassName( intfcl );
iw.println("}"); iw.println(); iw.print( CodegenUtils.fqcnLastElement( genclass ) ); iw.println("( " + CodegenUtils.simpleClassName( intfcl ) + " inner, NewPooledConnection parentPooledConnection )"); iw.println("{");
iw.println("}"); iw.println(); iw.print( CodegenUtils.fqcnLastElement( genclass ) ); iw.println("( " + CodegenUtils.simpleClassName( intfcl ) + " inner, NewPooledConnection parentPooledConnection )"); iw.println("{");
iw.println("}"); iw.println(); iw.print( CodegenUtils.fqcnLastElement( genclass ) ); iw.println("( " + CodegenUtils.simpleClassName( intfcl ) + " inner, NewPooledConnection parentPooledConnection, boolean cached, NewProxyConnection cProxy )");
iw.println("}"); iw.println(); iw.print( CodegenUtils.fqcnLastElement( genclass ) ); iw.println("( " + CodegenUtils.simpleClassName( intfcl ) + " inner, NewPooledConnection parentPooledConnection, boolean cached, NewProxyConnection cProxy )");