English 中文(简体)
由于某些中间建筑商职业,无法提供PerfHelper型的附加说明。
原标题:No enclosing instance of type PerfHelper is available due to some intermediate constructor invocation

审议以下法典:

class abstract Normal1 extends Something 
{
}

class Outer 
{
  class abstract Inner extends Normal1
  {

  }
}

class General extends Outer.Inner  // Problem occurs at this 
{
}

我所看到的错误是“由于某些中间建筑商的雇用,无法提供PerfHelper型的披露”。

我的问题是,我能否扩大上述内部阶层?

问题回答

宣布内产阶级为static,并允许延长:

class outer {
  static abstract class inner extends normal1 { }
}

如果内心不是抽象的,它就与外部联系在一起,只有在存在外事的情况下才能存在。 检查一下这是否真的想要。

Nest类同(在意义上) 某类财产。

  1. As in case of instance variable it only when available when its object is created as same as inner class also available when outer s object will created.

So if you want to extend this then make your inner class as static inner class
As jordao suggest above

Try this, (Read nested category inheritance Rules

abstract class normal1 extends something { }

class outer
{
  abstract class  inner extends normal1{}
}

class Outer1 extends outer
{
  class General extends inner {}
}

在您的班子里,总经理修改其建筑设计,叫上超级内层建筑商。 这里是法典。

public General(){
    new outer().super();
}




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签