I need that Inteface
is implemented by different classes for its methods but also in order to use polymorphism on that supertype.
All the classes have the same characteristics and they must be children of a superclass or implement the same interface.
However one of the classes that implement Interface
needs its methods but it should not be of type Interface
.
Is there a way to exclude a class from polymorphism without cloning Interface
and use it just for one class?
This is somewhere the interface I need it implements:
@FunctionalInterface
public interface Interface
{
Rapport makeRapport(Collection<Student> studs);
default RapportType getType()
{
return this.getClass().getAnnotation(Type.class).value();
}
}