public class ReturnTypeNameMatch extends Object implements net.bytebuddy.matcher.ElementMatcher<net.bytebuddy.description.method.MethodDescription>
ElementMatchers.returns(java.lang.Class<?>),
the only different between them is this match use String to declare the type, instead of Class.
This can avoid the classloader risk.
| Modifier and Type | Method and Description |
|---|---|
boolean |
matches(net.bytebuddy.description.method.MethodDescription target) |
static net.bytebuddy.matcher.ElementMatcher<net.bytebuddy.description.method.MethodDescription> |
returnsWithType(String returnTypeName)
The static method to create
ReturnTypeNameMatch
This is a delegate method to follow byte-buddy ElementMatcher's code style. |
public boolean matches(net.bytebuddy.description.method.MethodDescription target)
matches in interface net.bytebuddy.matcher.ElementMatcher<net.bytebuddy.description.method.MethodDescription>public static net.bytebuddy.matcher.ElementMatcher<net.bytebuddy.description.method.MethodDescription> returnsWithType(String returnTypeName)
ReturnTypeNameMatch
This is a delegate method to follow byte-buddy ElementMatcher's code style.returnTypeName - target return typeReturnTypeNameMatch instance.Copyright © 2019 The Apache Software Foundation. All rights reserved.