Package net.bytebuddy.pool
Class TypePool.Default.GenericTypeExtractor.ForSignature<T extends TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution>
- java.lang.Object
-
- org.objectweb.asm.signature.SignatureVisitor
-
- net.bytebuddy.pool.TypePool.Default.GenericTypeRegistrant.RejectingSignatureVisitor
-
- net.bytebuddy.pool.TypePool.Default.GenericTypeExtractor.ForSignature<T>
-
- Type Parameters:
T
- The type of the resolution this visitor extracts.
- All Implemented Interfaces:
TypePool.Default.GenericTypeRegistrant
- Direct Known Subclasses:
TypePool.Default.GenericTypeExtractor.ForSignature.OfMethod
,TypePool.Default.GenericTypeExtractor.ForSignature.OfType
- Enclosing class:
- TypePool.Default.GenericTypeExtractor
protected abstract static class TypePool.Default.GenericTypeExtractor.ForSignature<T extends TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution> extends TypePool.Default.GenericTypeRegistrant.RejectingSignatureVisitor implements TypePool.Default.GenericTypeRegistrant
A signature visitor for extracting a generic type resolution.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
TypePool.Default.GenericTypeExtractor.ForSignature.OfField
A parser for a generic field signature.protected static class
TypePool.Default.GenericTypeExtractor.ForSignature.OfMethod
A parser for a generic method signature.protected static class
TypePool.Default.GenericTypeExtractor.ForSignature.OfRecordComponent
A parser for a generic field signature.protected static class
TypePool.Default.GenericTypeExtractor.ForSignature.OfType
A parser for a generic type signature.-
Nested classes/interfaces inherited from interface net.bytebuddy.pool.TypePool.Default.GenericTypeRegistrant
TypePool.Default.GenericTypeRegistrant.RejectingSignatureVisitor
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<TypePool.Default.LazyTypeDescription.GenericTypeToken>
currentBounds
The bounds of the currently constructed type.protected java.lang.String
currentTypeParameter
The name of the currently constructed type.protected java.util.List<TypePool.Default.LazyTypeDescription.GenericTypeToken.OfFormalTypeVariable>
typeVariableTokens
The resolved type variable tokens.
-
Constructor Summary
Constructors Constructor Description ForSignature()
Creates a new signature visitor.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
collectTypeParameter()
Collects the currently constructed type.protected static <S extends TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution>
Sextract(java.lang.String genericSignature, TypePool.Default.GenericTypeExtractor.ForSignature<S> visitor)
Applies an extraction of a generic signature given the supplied visitor.void
register(TypePool.Default.LazyTypeDescription.GenericTypeToken token)
Registers a discovered generic type token.abstract T
resolve()
Completes the current resolution.org.objectweb.asm.signature.SignatureVisitor
visitClassBound()
void
visitFormalTypeParameter(java.lang.String name)
org.objectweb.asm.signature.SignatureVisitor
visitInterfaceBound()
-
Methods inherited from class net.bytebuddy.pool.TypePool.Default.GenericTypeRegistrant.RejectingSignatureVisitor
visitArrayType, visitBaseType, visitClassType, visitEnd, visitExceptionType, visitInnerClassType, visitInterface, visitParameterType, visitReturnType, visitSuperclass, visitTypeArgument, visitTypeArgument, visitTypeVariable
-
-
-
-
Field Detail
-
typeVariableTokens
protected final java.util.List<TypePool.Default.LazyTypeDescription.GenericTypeToken.OfFormalTypeVariable> typeVariableTokens
The resolved type variable tokens.
-
currentTypeParameter
protected java.lang.String currentTypeParameter
The name of the currently constructed type.
-
currentBounds
protected java.util.List<TypePool.Default.LazyTypeDescription.GenericTypeToken> currentBounds
The bounds of the currently constructed type.
-
-
Method Detail
-
extract
protected static <S extends TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution> S extract(java.lang.String genericSignature, TypePool.Default.GenericTypeExtractor.ForSignature<S> visitor)
Applies an extraction of a generic signature given the supplied visitor.- Type Parameters:
S
- The type of the generated resolution.- Parameters:
genericSignature
- The generic signature to interpret.visitor
- The visitor to apply.- Returns:
- The resolution of the supplied signature.
-
visitFormalTypeParameter
public void visitFormalTypeParameter(java.lang.String name)
-
visitClassBound
public org.objectweb.asm.signature.SignatureVisitor visitClassBound()
- Overrides:
visitClassBound
in classTypePool.Default.GenericTypeRegistrant.RejectingSignatureVisitor
-
visitInterfaceBound
public org.objectweb.asm.signature.SignatureVisitor visitInterfaceBound()
- Overrides:
visitInterfaceBound
in classTypePool.Default.GenericTypeRegistrant.RejectingSignatureVisitor
-
register
public void register(TypePool.Default.LazyTypeDescription.GenericTypeToken token)
Registers a discovered generic type token.- Specified by:
register
in interfaceTypePool.Default.GenericTypeRegistrant
- Parameters:
token
- The token to be registered.
-
collectTypeParameter
protected void collectTypeParameter()
Collects the currently constructed type.
-
resolve
public abstract T resolve()
Completes the current resolution.- Returns:
- The resolved generic signature.
-
-