Package net.bytebuddy.pool
Class TypePool.Default.LazyTypeDescription.TypeContainment.WithinType
java.lang.Object
net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.TypeContainment.WithinType
- All Implemented Interfaces:
TypePool.Default.LazyTypeDescription.TypeContainment
- Enclosing interface:
- TypePool.Default.LazyTypeDescription.TypeContainment
@Enhance
public static class TypePool.Default.LazyTypeDescription.TypeContainment.WithinType
extends Object
implements TypePool.Default.LazyTypeDescription.TypeContainment
Describes a type that is contained within another type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.TypeContainment
TypePool.Default.LazyTypeDescription.TypeContainment.SelfContained, TypePool.Default.LazyTypeDescription.TypeContainment.WithinMethod, TypePool.Default.LazyTypeDescription.TypeContainment.WithinType
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
WithinType
(String internalName, boolean localType) Creates a new type containment for a type that is declared 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.
-
Field Details
-
name
The type's binary name. -
localType
private final boolean localTypetrue
if the type is a local type unless it is an anonymous type.
-
-
Constructor Details
-
WithinType
Creates a new type containment for a type that is declared within another type.- Parameters:
internalName
- The type's internal name.localType
-true
if the type is a local type unless it is an anonymous type.
-
-
Method Details
-
getEnclosingMethod
Returns the enclosing method ornull
if no such method exists.- Specified by:
getEnclosingMethod
in interfaceTypePool.Default.LazyTypeDescription.TypeContainment
- 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.- Specified by:
getEnclosingType
in interfaceTypePool.Default.LazyTypeDescription.TypeContainment
- Parameters:
typePool
- The type pool to be used for looking up linked types.- Returns:
- A type description describing the linked type or
null
.
-
isSelfContained
public boolean isSelfContained()Returnstrue
if the type is self-contained.- Specified by:
isSelfContained
in interfaceTypePool.Default.LazyTypeDescription.TypeContainment
- Returns:
true
if the type is self-contained.
-
isLocalType
public boolean isLocalType()Returnstrue
if the type is a local type unless it is an anonymous type.- Specified by:
isLocalType
in interfaceTypePool.Default.LazyTypeDescription.TypeContainment
- Returns:
true
if the type is a local type unless it is an anonymous type
-