Using a class as an argument.
in
Programming Questions
•
2 years ago
So basically I'm looking for something like this:
boolean checkClass(Class c) {
return(obj instanceof c);
}
Where obj is an instance of an abstract class with several extending classes.
Both Processing and Eclipse with Processing disallow this, saying something about not recognizing c.
Is there some way of doing this that I'm missing?
boolean checkClass(Class c) {
return(obj instanceof c);
}
Where obj is an instance of an abstract class with several extending classes.
Both Processing and Eclipse with Processing disallow this, saying something about not recognizing c.
Is there some way of doing this that I'm missing?
1