When Methods just are not enought.



  • <FONT face="Courier New" size=2>package quickUtil;
    import java.io.File;

    //---------------------------------------------------

    public class mkFolder {
                
        public mkFolder(String folder)
        {
            
            
            
            File tmp = new File(folder);
            
            if (!tmp.exists())
            {
                tmp.mkdirs();
                
            }            
        }
        
        //    ---------------------------------------------------

    }</FONT>

    and ~5 other "quick utils". Ones that return a value look like:

    <FONT face="Courier New" size=2>class Test {
       String returnValue;
       Test( params ) { /* work */ }
       String getReturn() { return returnValue; }
    }</FONT>

    Yes, the code is littered with

    <FONT face="Courier New" size=2>new mkFolder( "blah" );

    Test t = new Test( .... );
    String v = t.getReturn();</FONT>

    <FONT face="Courier New" size=2>(ED: Fixed formatting)</FONT>



  • @mlk said:

    <font face="Courier New" size="2">
       Test( params ) { /* work */ }</font>



    I like this.

    Ensuring proper operation purely by willing it.



  • :D



    I could not be bothered to post all of it. It hurts to much.



  • <font size="2">"'static'?  What's that?"



    </font>



  • shakes

    I've just starting looking over a different project by the same group.
    I'm sure two different developers are involved (uses static methods).
    However it adds c:\program files to the path. Then runs java
    companyname.appname.Main. The wrongness, it burns.


Log in to reply