|
org.netbeans.modules.classfile/1 1.19 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.modules.classfile.EnclosingMethod
public final class EnclosingMethod
A class representing the enclosing method of an inner class. An enclosing method is similar to a CPMethodInfo type, but differs in two respects. First, the classfile stores this information in an "EnclosingMethod" attribute, rather than in the constant pool Second, an enclosing method attribute may not actually have a method reference (only a class reference). This is because the inner class is defined in an init block instead of an actual method.
ClassFile.getEnclosingMethod()
Method Summary | |
---|---|
CPClassInfo |
getClassInfo()
Returns the constant pool entry for the enclosing class. |
ClassName |
getClassName()
|
CPNameAndTypeInfo |
getMethodInfo()
Returns the constant pool entry for the enclosing method, or null if the inner class was defined outside of any method or constructor bodies. |
boolean |
hasMethod()
Returns whether the enclosing method attribute describes a method the inner class is defined within. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public ClassName getClassName()
public CPClassInfo getClassInfo()
public boolean hasMethod()
public CPNameAndTypeInfo getMethodInfo()
public String toString()
|
org.netbeans.modules.classfile/1 1.19 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |