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 enumDescribes a type that is not contained within another type, a method or a constructor.static classDescribes a type that is contained within a method or constructor.static classDescribes a type that is contained within another type. -
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.
-
Method Details
-
getEnclosingMethod
Returns the enclosing method ornullif 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 ornullif 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()Returnstrueif the type is self-contained.- Returns:
trueif the type is self-contained.
-
isLocalType
boolean isLocalType()Returnstrueif the type is a local type unless it is an anonymous type.- Returns:
trueif the type is a local type unless it is an anonymous type
-