Hello everybody!
I use the actiWATE library for one project. This is a code
file Main.java

import bro.bro;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

public class Main
{
public static void main(String[] args) throws UnsupportedEncodingException, IOException
{
bro doBro= new bro();
}
}

file bro.java

import com.actimind.actiwate.http.HttpResponse;
import com.actimind.actiwate.testing.ActiwateTestCase;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

public class bro extends ActiwateTestCase {
public bro() throws UnsupportedEncodingException, IOException{
disableJavaScript(true);
goTo( "http://google.com" );
}
}

And now I want to get all headers. In this library is a method getAllHeaders() and I hoped use it like this

file bro.java

package bro;
import com.actimind.actiwate.http.HttpResponse;
import com.actimind.actiwate.testing.ActiwateTestCase;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

public class bro extends ActiwateTestCase {
public bro() throws UnsupportedEncodingException, IOException{
       disableJavaScript(true);
       goTo( "http://google.com" );
}
public class WOW implements HttpResponse 
{
}
}

but NetBeans IDE 6.8 required implementing all abstract methods. It's great but the next step is the overriding all these methods but I don't want it. I want use method getAllHeaders() without any overriding because it returns all header in one string.
Ok. In order to don't overriding method I do it like an abstract class WOW with implements HttpResponse

package bro;
import com.actimind.actiwate.http.HttpResponse;
import com.actimind.actiwate.testing.ActiwateTestCase;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

public class bro extends ActiwateTestCase {
public bro() throws UnsupportedEncodingException, IOException{
       disableJavaScript(true);
       goTo( "http://google.com" );
}
public abstract class WOW implements HttpResponse 
{
}
}

The creation of objects from abstract classes is impossible and we need to create a class that extends abstract class WOW like this

package bro;
import com.actimind.actiwate.http.HttpResponse;
import com.actimind.actiwate.testing.ActiwateTestCase;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

public class bro extends ActiwateTestCase {
public bro() throws UnsupportedEncodingException, IOException{
       disableJavaScript(true);
       goTo( "http://google.com" );
}
public abstract class WOW implements HttpResponse
{
}
public class WOW2 extends WOW
{
}
}

But in this case IDE requires the implementation of all abstract methods with them overriding again! How can I avoid it and use this method? Thanks for all answers!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.