public static void writePropertyVariable( Property prop, String defaultValueExpression, IndentedWriter iw ) throws IOException { iw.print( CodegenUtils.getModifierString( prop.getVariableModifiers() ) ); iw.print( ' ' + prop.getSimpleTypeName() + ' ' + prop.getName()); String dflt = defaultValueExpression; if (dflt != null) iw.print( " = " + dflt ); iw.println(';'); }
public static void writeExplicitDefaultConstructor( int ctor_modifiers, ClassInfo info, IndentedWriter iw) throws IOException { iw.print( CodegenUtils.getModifierString( ctor_modifiers ) ); iw.println(' ' + info.getClassName() + "()"); iw.println("{}"); }
protected void writeOtherVariables() throws IOException { iw.println( CodegenUtils.getModifierString( inner_bean_member_modifiers ) + ' ' + findInnerBeanClassName() + " innerBean = " + findInnerBeanInitializationExpression() + ';'); iw.println(); iw.println( CodegenUtils.getModifierString( inner_bean_accessor_modifiers ) + ' ' + findInnerBeanClassName() + " accessInnerBean()"); iw.println("{ return innerBean; }"); }
protected void writeInternalUtilityFunctions() throws IOException { iw.println("private boolean eqOrBothNull( Object a, Object b )"); iw.println("{"); iw.upIndent(); iw.println("return"); iw.upIndent(); iw.println("a == b ||"); iw.println("(a != null && a.equals(b));"); iw.downIndent(); iw.downIndent(); iw.println("}"); }
protected void generateDelegateCode( Class intfcl, String genclass, Method method, IndentedWriter iw ) throws IOException { Class retType = method.getReturnType(); iw.println( (retType == void.class ? "" : "return " ) + "inner." + CodegenUtils.methodCall( method ) + ";" ); }
public static void writePropertyVariable( Property prop, String defaultValueExpression, IndentedWriter iw ) throws IOException { iw.print( CodegenUtils.getModifierString( prop.getVariableModifiers() ) ); iw.print( ' ' + prop.getSimpleTypeName() + ' ' + prop.getName()); String dflt = defaultValueExpression; if (dflt != null) iw.print( " = " + dflt ); iw.println(';'); }
public static void writeExplicitDefaultConstructor( int ctor_modifiers, ClassInfo info, IndentedWriter iw) throws IOException { iw.print( CodegenUtils.getModifierString( ctor_modifiers ) ); iw.println(' ' + info.getClassName() + "()"); iw.println("{}"); }
protected void generateDelegateCode( Class intfcl, String genclass, Method method, IndentedWriter iw ) throws IOException { Class retType = method.getReturnType(); iw.println( (retType == void.class ? "" : "return " ) + "inner." + CodegenUtils.methodCall( method ) + ";" ); }
public void generate(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw) throws IOException { iw.println("// JDK7 add-on"); iw.println("public Logger getParentLogger() throws SQLFeatureNotSupportedException"); iw.println("{ return C3P0ImplUtils.PARENT_LOGGER;}"); } }
public static void writeExplicitDefaultConstructor( int ctor_modifiers, ClassInfo info, IndentedWriter iw) throws IOException { iw.print( CodegenUtils.getModifierString( ctor_modifiers ) ); iw.println(' ' + info.getClassName() + "()"); iw.println("{}"); }
protected void generateDelegateCode( Class intfcl, String genclass, Method method, IndentedWriter iw ) throws IOException { Class retType = method.getReturnType(); iw.println( (retType == void.class ? "" : "return " ) + "inner." + CodegenUtils.methodCall( method ) + ";" ); }
public void generate(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw) throws IOException { iw.println("protected abstract PooledConnection getPooledConnection( ConnectionCustomizer cc, String idt)" + " throws SQLException;"); iw.println("protected abstract PooledConnection getPooledConnection(String user, String password, ConnectionCustomizer cc, String idt)" + " throws SQLException;"); } }
public void generate(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw) throws IOException { iw.println("// JDK7 add-on"); iw.println("public Logger getParentLogger() throws SQLFeatureNotSupportedException"); iw.println("{ throw new SQLFeatureNotSupportedException(\042javax.sql.DataSource.getParentLogger() is not currently supported by \042 + this.getClass().getName());}"); } }
public void generate(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw) throws IOException { iw.println("// JDK7 add-on"); iw.println("public Logger getParentLogger() throws SQLFeatureNotSupportedException"); iw.println("{ throw new SQLFeatureNotSupportedException(\042javax.sql.DataSource.getParentLogger() is not currently supported by \042 + this.getClass().getName());}"); } }