我的应用程序有问题,我无法实例化一个类
这是我的java.lang.ClassCastException
eclipse.emf.editeurgraphique.risque.features.StartEventFeature$CreateStartEventFeature cannot be cast to org.eclipse.graphiti.features.ICreateFeature
at eclipse.emf.editeurgraphique.risque.features.StartEventFeature.getCreateFeature(StartEventFeature.java:43)
这是我的方法:
public ICreateFeature getCreateFeature(IFeatureProvider fp) {
return (ICreateFeature) new CreateStartEventFeature(fp);
}
我的界面:
public interface ICreateFeature extends ICreate, IFeature {
}
和我的班级
public CreateStartEventFeature(IFeatureProvider fp) {
super(fp, "Start Event", "Indicates the start of a process or choreography");
}