This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Java in General and the fly likes Proxy instance of a class that does not implement any interface. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Proxy instance of a class that does not implement any interface. " Watch "Proxy instance of a class that does not implement any interface. " New topic
Author

Proxy instance of a class that does not implement any interface.

samir ware
Ranch Hand

Joined: Jul 27, 2005
Posts: 192
Hello Ranchers
Can anyone please explain me whether it is possible to create proxy for a class that don't implement any interface. I have seen the examples for java.lang.reflect.Proxy and I could see that it is possible to create a proxy for a class which implment certain set of interfaces by using API



in Proxy class. Though this API expects interface as its second parameter. Is it possible to create proxy object without any interface ?

Thanks in advance
Samir
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19557
    
  16

A short Google search for "java proxy abstract class" gave me a few good results. The first one looks very promising: http://stackoverflow.com/questions/3291637/alternatives-to-java-lang-reflect-proxy-for-creating-proxies-of-abstract-classes


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Proxy instance of a class that does not implement any interface.
 
Similar Threads
interface
Can spring make a class implement an interface?
Use of InvocationHandler too complex for Jr. Programmer?
Reg : marker interface
Implementing a Java interface at runtime