package com.andybug.jaspe;

class Config
{
}

@@ -36,10 +36,678 @@
 onfig%0A%7B%0A
+%0A    /* internal classes */%0A%0A    static class ServerPorts%0A    %7B%0A%09public short jaspe;%0A%09public short redis;%0A%09public short postgres;%0A    %7D%0A%0A%0A    /* document members */%0A%0A    public ServerPorts servers;%0A%0A%0A    /* methods */%0A%0A    public boolean validate()%0A    %7B%0A%09boolean retval = true;%0A%0A%09/* validate ports */%0A%09retval = retval && validatePort(servers.jaspe);%0A%09retval = retval && validatePort(servers.redis);%0A%09retval = retval && validatePort(servers.postgres);%0A%0A%09return retval;%0A    %7D%0A%0A%0A    /* private methods */%0A%0A    private boolean validatePort(short port)%0A    %7B%0A%09final int PORT_MAX = (1 %3C%3C 16) - 1;%0A%0A%09if (port %3C 0 %7C%7C port %3E PORT_MAX)%0A%09    return false;%0A%0A%09return true;%0A    %7D%0A%0A
 %7D%0A

Implement simple Config class