| Author |
java reflection and abstract class
|
thomas silver
Ranch Hand
Joined: Jun 20, 2003
Posts: 32
|
|
|
Is there a way to indentiy an abstract class (which contains no abstract method) via java reflection? Thanks.
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24081
|
|
|
Have a look at the class java.lang.Class. You get ahold of the Class object for the class, then look at the Modifiers for the Class object, one of which might be Modifier.ABSTRACT .
|
[Jess in Action][AskingGoodQuestions]
|
 |
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
|
|
|
Modifier.isAbstract(someClass.getModifiers())
|
"I'm not back." - Bill Harding, Twister
|
 |
 |
|
|
subject: java reflection and abstract class
|
|
|