Package net.bytebuddy.dynamic.scaffold
Class MethodRegistry.Default.Prepared.Entry
- java.lang.Object
-
- net.bytebuddy.dynamic.scaffold.MethodRegistry.Default.Prepared.Entry
-
- Enclosing class:
- MethodRegistry.Default.Prepared
@Enhance protected static class MethodRegistry.Default.Prepared.Entry extends java.lang.Object
An entry of a prepared method registry.
-
-
Field Summary
Fields Modifier and Type Field Description private MethodAttributeAppender.FactoryattributeAppenderFactoryA attribute appender factory for appending attributes for any implemented method.private booleanbridgeMethodIstrueif this entry represents a bridge method.private MethodRegistry.HandlerhandlerThe handler for implementing methods.private MethodDescriptionmethodDescriptionThe method this entry represents.private java.util.Set<MethodDescription.TypeToken>typeTokensThe method's type tokens.private VisibilityvisibilityThe minimum required visibility of this method.
-
Constructor Summary
Constructors Modifier Constructor Description protectedEntry(MethodRegistry.Handler handler, MethodAttributeAppender.Factory attributeAppenderFactory, MethodDescription methodDescription, java.util.Set<MethodDescription.TypeToken> typeTokens, Visibility visibility, boolean bridgeMethod)Creates a new prepared entry.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static MethodRegistry.Default.Prepared.EntryforVisibilityBridge(MethodDescription bridgeTarget, Visibility visibility)Creates an entry for a visibility bridge.protected MethodAttributeAppender.FactorygetAppenderFactory()Returns this entry's attribute appender factory.protected MethodRegistry.HandlergetHandler()Returns this entry's handler.protected MethodDescriptiongetMethodDescription()Returns the method description this entry represents.protected VisibilitygetVisibility()Returns the represented method's minimum visibility.protected booleanisBridgeMethod()Returnstrueif this entry represents a bridge method.protected java.util.Set<MethodDescription.TypeToken>resolveBridgeTypes()Resolves the type tokens of all bridge methods that are required to be implemented for this entry.
-
-
-
Field Detail
-
handler
private final MethodRegistry.Handler handler
The handler for implementing methods.
-
attributeAppenderFactory
private final MethodAttributeAppender.Factory attributeAppenderFactory
A attribute appender factory for appending attributes for any implemented method.
-
methodDescription
private final MethodDescription methodDescription
The method this entry represents.
-
typeTokens
private final java.util.Set<MethodDescription.TypeToken> typeTokens
The method's type tokens.
-
visibility
private final Visibility visibility
The minimum required visibility of this method.
-
bridgeMethod
private final boolean bridgeMethod
Istrueif this entry represents a bridge method.
-
-
Constructor Detail
-
Entry
protected Entry(MethodRegistry.Handler handler, MethodAttributeAppender.Factory attributeAppenderFactory, MethodDescription methodDescription, java.util.Set<MethodDescription.TypeToken> typeTokens, Visibility visibility, boolean bridgeMethod)
Creates a new prepared entry.- Parameters:
handler- The handler for implementing methods.attributeAppenderFactory- A attribute appender factory for appending attributes for any implemented method.methodDescription- The method this entry represents.typeTokens- A set of bridges representing the bridge methods of this method.visibility- The minimum required visibility of this method.bridgeMethod-trueif this entry represents a bridge method.
-
-
Method Detail
-
forVisibilityBridge
protected static MethodRegistry.Default.Prepared.Entry forVisibilityBridge(MethodDescription bridgeTarget, Visibility visibility)
Creates an entry for a visibility bridge.- Parameters:
bridgeTarget- The bridge method's target.visibility- The represented method's minimum visibility.- Returns:
- An entry representing a visibility bridge.
-
getHandler
protected MethodRegistry.Handler getHandler()
Returns this entry's handler.- Returns:
- The entry's handler.
-
getAppenderFactory
protected MethodAttributeAppender.Factory getAppenderFactory()
Returns this entry's attribute appender factory.- Returns:
- This entry's attribute appender factory.
-
getMethodDescription
protected MethodDescription getMethodDescription()
Returns the method description this entry represents.- Returns:
- The method description this entry represents.
-
resolveBridgeTypes
protected java.util.Set<MethodDescription.TypeToken> resolveBridgeTypes()
Resolves the type tokens of all bridge methods that are required to be implemented for this entry.- Returns:
- A set of type tokens representing the bridge methods required for implementing this type.
-
getVisibility
protected Visibility getVisibility()
Returns the represented method's minimum visibility.- Returns:
- The represented method's minimum visibility.
-
isBridgeMethod
protected boolean isBridgeMethod()
Returnstrueif this entry represents a bridge method.- Returns:
trueif this entry represents a bridge method.
-
-