public class HandlerMethod extends ObjectSE
クラスは、Bean インスタンスまたは Bean 名(例: lazy-init Bean、プロトタイプ Bean)で作成できます。createWithResolvedBean()
を使用して、関連する BeanFactory
によって解決された Bean インスタンスを持つ HandlerMethod
インスタンスを取得します。
修飾子と型 | クラスと説明 |
---|---|
protected class | HandlerMethod.HandlerMethodParameter HandlerMethod 固有の動作を持つ MethodParameter。 |
修飾子 | コンストラクターと説明 |
---|---|
protected | HandlerMethod(HandlerMethod handlerMethod) サブクラスで使用するコンストラクターをコピーします。 |
| HandlerMethod(ObjectSE bean, MethodSE method) Bean インスタンスとメソッドからインスタンスを作成します。 |
| HandlerMethod(ObjectSE bean, StringSE methodName, ClassSE<?>... parameterTypes) Bean インスタンス、メソッド名、パラメーター型からインスタンスを作成します。 |
| HandlerMethod(StringSE beanName, BeanFactory beanFactory, MethodSE method) Bean 名、メソッド、 BeanFactory からインスタンスを作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
HandlerMethod | createWithResolvedBean() 提供されたインスタンスにオブジェクトインスタンスではなく Bean 名が含まれる場合、 HandlerMethod が作成されて返される前に、Bean 名が解決されます。 |
boolean | equals(ObjectSE other) |
ObjectSE | getBean() このハンドラーメソッドの Bean を返します。 |
ClassSE<?> | getBeanType() このメソッドは、このハンドラーメソッドのハンドラーの型を返します。 |
protected MethodSE | getBridgedMethod() Bean メソッドがブリッジメソッドである場合、このメソッドはブリッジ(ユーザー定義)メソッドを返します。 |
MethodSE | getMethod() このハンドラーメソッドのメソッドを返します。 |
<A extends AnnotationSE> | getMethodAnnotation(ClassSE<A> annotationType) 指定されたメソッド自体にアノテーションが見つからない場合、そのスーパーメソッドをトラバースする基礎となるメソッドに単一のアノテーションを返します。 |
MethodParameter[] | getMethodParameters() このハンドラーメソッドのメソッドパラメーターを返します。 |
HandlerMethod | getResolvedFromHandlerMethod() この HandlerMethod インスタンスが createWithResolvedBean() を介して解決された HandlerMethod を返します。 |
MethodParameter | getReturnType() HandlerMethod 戻り値の型を返します。 |
MethodParameter | getReturnValueType(ObjectSE returnValue) 実際の戻り値の型を返します。 |
StringSE | getShortLogMessage() ログメッセージのために、このハンドラーメソッドの短い表現を返します。 |
int | hashCode() |
<A extends AnnotationSE> | hasMethodAnnotation(ClassSE<A> annotationType) 指定されたアノテーション型でパラメーターが宣言されているかどうかを返します。 |
boolean | isVoid() メソッドの戻り値の型が void の場合は true を返し、そうでない場合は false を返します。 |
StringSE | toString() |
cloneSE, finalizeSE, getClassSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
protected final Log logger
public HandlerMethod(ObjectSE bean, StringSE methodName, ClassSE<?>... parameterTypes) throws NoSuchMethodExceptionSE
NoSuchMethodExceptionSE
- メソッドが見つからない場合 public HandlerMethod(StringSE beanName, BeanFactory beanFactory, MethodSE method)
BeanFactory
からインスタンスを作成します。メソッド createWithResolvedBean()
は、初期化された Bean で HandlerMethod
を再作成するために後で使用できます。protected HandlerMethod(HandlerMethod handlerMethod)
public ObjectSE getBean()
public MethodSE getMethod()
public ClassSE<?> getBeanType()
Bean 型が CGLIB で生成されたクラスである場合、元のユーザー定義のクラスが返されることに注意してください。
protected MethodSE getBridgedMethod()
getMethod()
と同じメソッドを返します。public MethodParameter[] getMethodParameters()
public MethodParameter getReturnType()
public MethodParameter getReturnValueType(@Nullable ObjectSE returnValue)
public boolean isVoid()
true
を返し、そうでない場合は false
を返します。@Nullable public <A extends AnnotationSE> A getMethodAnnotation(ClassSE<A> annotationType)
Spring Framework 4.3 の時点で、属性オーバーライドを使用してマージされた合成アノテーションもサポートします。
annotationType
- メソッドをイントロスペクトするためのアノテーションの型 null
AnnotatedElementUtils.findMergedAnnotation(java.lang.reflect.AnnotatedElement, java.lang.Class<A>)
public <A extends AnnotationSE> boolean hasMethodAnnotation(ClassSE<A> annotationType)
annotationType
- 検索するアノテーション型 AnnotatedElementUtils.hasAnnotation(java.lang.reflect.AnnotatedElement, java.lang.Class<? extends java.lang.annotation.Annotation>)
@Nullable public HandlerMethod getResolvedFromHandlerMethod()
createWithResolvedBean()
を介して解決された HandlerMethod を返します。public HandlerMethod createWithResolvedBean()
HandlerMethod
が作成されて返される前に、Bean 名が解決されます。public StringSE getShortLogMessage()
public int hashCode()
ObjectSE
の hashCodeSE
public StringSE toString()
ObjectSE
の toStringSE