Package net.bytebuddy.pool
Class TypePool.Default.LazyTypeDescription.TypeContainment.WithinMethod
java.lang.Object
net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.TypeContainment.WithinMethod
- All Implemented Interfaces:
TypePool.Default.LazyTypeDescription.TypeContainment
- Enclosing interface:
TypePool.Default.LazyTypeDescription.TypeContainment
@Enhance
public static class TypePool.Default.LazyTypeDescription.TypeContainment.WithinMethod
extends Object
implements TypePool.Default.LazyTypeDescription.TypeContainment
Describes a type that is contained within a method or constructor.
-
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
ConstructorsModifierConstructorDescriptionprotectedWithinMethod(String internalName, String methodName, String methodDescriptor) Creates a new type containment for a type that is declared within a method. -
Method Summary
Modifier and TypeMethodDescriptiongetEnclosingMethod(TypePool typePool) Returns the enclosing method ornullif no such method exists.getEnclosingType(TypePool typePool) Returns the enclosing type ornullif no such type exists.booleanReturnstrueif the type is a local type unless it is an anonymous type.booleanReturnstrueif the type is self-contained.
-
Field Details
-
name
The method's declaring type's internal name. -
methodName
The method's internal name. -
methodDescriptor
The method's descriptor.
-
-
Constructor Details
-
WithinMethod
Creates a new type containment for a type that is declared within a method.- Parameters:
internalName- The method's declaring type's internal name.methodName- The method's internal name.methodDescriptor- The method's descriptor.
-
-
Method Details
-
getEnclosingMethod
Returns the enclosing method ornullif no such method exists.- Specified by:
getEnclosingMethodin 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 ornullif no such type exists.- Specified by:
getEnclosingTypein 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()Returnstrueif the type is self-contained.- Specified by:
isSelfContainedin interfaceTypePool.Default.LazyTypeDescription.TypeContainment- Returns:
trueif the type is self-contained.
-
isLocalType
public boolean isLocalType()Returnstrueif the type is a local type unless it is an anonymous type.- Specified by:
isLocalTypein interfaceTypePool.Default.LazyTypeDescription.TypeContainment- Returns:
trueif the type is a local type unless it is an anonymous type
-