I got a simple question:
Why does Eclipse scream about implementing these two interfaces?
public abstract class Gateway implements IPlayerity, IItemity {
public interface IPlayerity { ... }
public interface IItemity { ... }
// I...ity
}
I get this error message:
IPlayerity cannot be resolved to a type
You have a cyclic dependency that can't be resolved given the way the JLS works (although I'm not sure where in the JLS this is documented).
The interfaces IPlayerity and IItemity are not visible to the NestedInterfaces class header definition, since they are inside it. I can fix this by changing your program to
public class NestedInterfaces implements
NestedInterfaces.IPlayerity, NestedInterfaces.IItemity
{
public interface IPlayerity {}
public interface IItemity {}
}
but then Eclipse gives me this error, which is much more clear:
Multiple markers at this line
- Cycle detected: the type NestedInterfaces cannot extend/implement itself or one of its own member types
- Cycle detected: the type NestedInterfaces cannot extend/implement itself or one of its own member types
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With