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
Returns the constant pool entry for the enclosing class.
public boolean hasMethod()
Returns whether the enclosing method attribute describes a method
the inner class is defined within. If false, then the inner
class was defined in an init block (or statement) in the class,
outside of any method or constructor bodies.
Returns the constant pool entry for the enclosing method, or
null if the inner class was defined outside of any method or
Note: a CPNameAndTypeInfo instance is returned because the method
is external to the enclosed class. Do not attempt to cast it to a
CPMethodInfo type, which is an internal method structure.