Package net.bytebuddy.pool
Interface TypePool.Default.LazyTypeDescription.TypeContainment
- All Known Implementing Classes:
TypePool.Default.LazyTypeDescription.TypeContainment.SelfContained
,TypePool.Default.LazyTypeDescription.TypeContainment.WithinMethod
,TypePool.Default.LazyTypeDescription.TypeContainment.WithinType
- Enclosing class:
TypePool.Default.LazyTypeDescription
protected static interface TypePool.Default.LazyTypeDescription.TypeContainment
A declaration context encapsulates information about whether a type was declared within another type
or within a method of another type.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Describes a type that is not contained within another type, a method or a constructor.static class
Describes a type that is contained within a method or constructor.static class
Describes a type that is contained within another type. -
Method Summary
Modifier and TypeMethodDescriptiongetEnclosingMethod
(TypePool typePool) Returns the enclosing method ornull
if no such method exists.getEnclosingType
(TypePool typePool) Returns the enclosing type ornull
if no such type exists.boolean
Returnstrue
if the type is a local type unless it is an anonymous type.boolean
Returnstrue
if the type is self-contained.
-
Method Details
-
getEnclosingMethod
Returns the enclosing method ornull
if no such method exists.- Parameters:
typePool
- The type pool to be used for looking up linked types.- Returns:
- A method description describing the linked type or
null
.
-
getEnclosingType
Returns the enclosing type ornull
if no such type exists.- Parameters:
typePool
- The type pool to be used for looking up linked types.- Returns:
- A type description describing the linked type or
null
.
-
isSelfContained
boolean isSelfContained()Returnstrue
if the type is self-contained.- Returns:
true
if the type is self-contained.
-
isLocalType
boolean isLocalType()Returnstrue
if the type is a local type unless it is an anonymous type.- Returns:
true
if the type is a local type unless it is an anonymous type
-