I have been developing android applications for about 1 month now I am getting pretty familiar with the Java syntax but today I stumbled upon this piece of code :
try {
Class<? extends ContactAccessor> clazz =
Class.forName(className).asSubclass(ContactAccessor.class);
sInstance = clazz.newInstance();
} catch (Exception e) {
throw new IllegalStateException(e);
}
Could somebody explain me what this Class<? extends ContactAccessor> clazz does?
It means you have a Class which is ContactAccessor class or a sub class of that class or interface.
Since you have
ContactAccessor.classalready, I would assume you have a sub class.