Package net.bytebuddy.pool
Class TypePool.AbstractBase.ArrayTypeResolution
- java.lang.Object
-
- net.bytebuddy.pool.TypePool.AbstractBase.ArrayTypeResolution
-
- All Implemented Interfaces:
TypePool.Resolution
- Enclosing class:
- TypePool.AbstractBase
@Enhance protected static class TypePool.AbstractBase.ArrayTypeResolution extends java.lang.Object implements TypePool.Resolution
A resolution for a type that, if resolved, represents an array type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.pool.TypePool.Resolution
TypePool.Resolution.Illegal, TypePool.Resolution.Simple
-
-
Field Summary
Fields Modifier and Type Field Description private int
arity
The arity of the represented array.private TypePool.Resolution
resolution
The underlying resolution that is represented by this instance.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ArrayTypeResolution(TypePool.Resolution resolution, int arity)
Creates a wrapper for another resolution that, if resolved, represents an array type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isResolved()
Determines if this resolution represents a fully-resolvedTypeDescription
.protected static TypePool.Resolution
of(TypePool.Resolution resolution, int arity)
Creates a wrapper for another resolution that, if resolved, represents an array type.TypeDescription
resolve()
Resolves this resolution to aTypeDescription
.
-
-
-
Field Detail
-
resolution
private final TypePool.Resolution resolution
The underlying resolution that is represented by this instance.
-
arity
private final int arity
The arity of the represented array.
-
-
Constructor Detail
-
ArrayTypeResolution
protected ArrayTypeResolution(TypePool.Resolution resolution, int arity)
Creates a wrapper for another resolution that, if resolved, represents an array type.- Parameters:
resolution
- The underlying resolution that is represented by this instance.arity
- The arity of the represented array.
-
-
Method Detail
-
of
protected static TypePool.Resolution of(TypePool.Resolution resolution, int arity)
Creates a wrapper for another resolution that, if resolved, represents an array type. The wrapper is only created if the arity is not zero. If the arity is zero, the given resolution is simply returned instead.- Parameters:
resolution
- The underlying resolution that is represented by this instance.arity
- The arity of the represented array.- Returns:
- A wrapper for another resolution that, if resolved, represents an array type or the given resolution if the given arity is zero.
-
isResolved
public boolean isResolved()
Determines if this resolution represents a fully-resolvedTypeDescription
.- Specified by:
isResolved
in interfaceTypePool.Resolution
- Returns:
true
if the queried type could be resolved.
-
resolve
public TypeDescription resolve()
Resolves this resolution to aTypeDescription
. If this resolution is unresolved, this method throws an exception either upon invoking this method or upon invoking at least one method of the returned type description.- Specified by:
resolve
in interfaceTypePool.Resolution
- Returns:
- The type description that is represented by this resolution.
-
-