me.tomassetti.symbolsolver.model.declarations.InterfaceDeclaration Maven / Gradle / Ivy
package me.tomassetti.symbolsolver.model.declarations;
import java.util.ArrayList;
import java.util.List;
/**
* An interface declaration.
*
* @author Federico Tomassetti
*/
public interface InterfaceDeclaration extends TypeDeclaration, TypeParametrized {
@Override
default boolean isInterface() {
return true;
}
List getInterfacesExtended();
default List getAllInterfacesExtended() {
List interfaces = new ArrayList<>();
for (InterfaceDeclaration interfaceDeclaration : getInterfacesExtended()) {
interfaces.add(interfaceDeclaration);
interfaces.addAll(interfaceDeclaration.getAllInterfacesExtended());
}
return interfaces;
}
}