0
所以我有這個Annotator
接口:的Java:「錯誤:無法訪問」的接口
public interface Annotator {
String getViewName();
View getView(TextAnnotation var1) throws AnnotatorException;
String[] getRequiredViews();
}
這是由GazetteerViewGenerator
擴展:
public class GazetteerViewGenerator extends Annotator {
public static final GazetteerViewGenerator gazetteersInstance;
...
的問題是,當我創建的對象GazetteerViewGenerator
並投入Annotator
它給我錯誤,這真的很奇怪:
public class MyCuratorClient {
public static Annotator gazetteers = (Annotator) GazetteerViewGenerator.gazetteersInstance;
...
這裏是錯誤:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project Illinois-Combined-Coref: Compilation failure
[ERROR] /Users/danielk/ideaProjects/Illinois-Combined-Coref/src/main/java/edu/illinois/cs/cogcomp/lbj/coref/util/MyCuratorClient.java:[25,38] error: cannot access Annotator
[ERROR] -> [Help 1]
[ERROR]
任何想法,我哪裏出錯了?