从Java语言角度来看,我希望SpecificRectangle对象能够访问area()方法,因为area()是它父(Rectangle类)原型的方法。SpecificRectangle.prototype=new Rectangle();我根本不能在SpecificRectangle实例上调用area()方法。获取标准JS错误:
TypeError: specrec.area is not
就在我以为我得到它的时候,我好像被困住了。我的应用程序有两个组件,ApplicationComponent (单例)和StripeComponent (1:1活动),它们继承一个空接口以提高可读性。@Module public class ApplicationModuleApplicationModule提供的对象之一是一个Navigator,我相当肯定它的方式是正确的:
@Provides @Singleton Navigator