Polish Javadoc for LookupOverride and related code
This commit is contained in:
parent
c335e99e3f
commit
f77bf2422e
|
@ -56,7 +56,7 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt
|
|||
|
||||
/**
|
||||
* Index in the CGLIB callback array for a method that should
|
||||
* be overridden using generic Methodreplacer functionality.
|
||||
* be overridden using generic <em>method replacer</em> functionality.
|
||||
*/
|
||||
private static final int METHOD_REPLACER = 2;
|
||||
|
||||
|
@ -96,13 +96,13 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a new instance of a dynamically generated subclasses implementing the
|
||||
* Create a new instance of a dynamically generated subclass implementing the
|
||||
* required lookups.
|
||||
* @param ctor constructor to use. If this is {@code null}, use the
|
||||
* no-arg constructor (no parameterization, or Setter Injection)
|
||||
* @param args arguments to use for the constructor.
|
||||
* Ignored if the ctor parameter is {@code null}.
|
||||
* @return new instance of the dynamically generated class
|
||||
* @return new instance of the dynamically generated subclass
|
||||
*/
|
||||
public Object instantiate(Constructor<?> ctor, Object[] args) {
|
||||
Enhancer enhancer = new Enhancer();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -39,8 +39,8 @@ public class LookupOverride extends MethodOverride {
|
|||
* Construct a new LookupOverride.
|
||||
* @param methodName the name of the method to override.
|
||||
* This method must have no arguments.
|
||||
* @param beanName name of the bean in the current BeanFactory
|
||||
* that the overriden method should return
|
||||
* @param beanName the name of the bean in the current BeanFactory
|
||||
* that the overridden method should return
|
||||
*/
|
||||
public LookupOverride(String methodName, String beanName) {
|
||||
super(methodName);
|
||||
|
@ -55,16 +55,14 @@ public class LookupOverride extends MethodOverride {
|
|||
return this.beanName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Match method of the given name, with no parameters.
|
||||
* Match the method of the given name, with no parameters.
|
||||
*/
|
||||
@Override
|
||||
public boolean matches(Method method) {
|
||||
return (method.getName().equals(getMethodName()) && method.getParameterTypes().length == 0);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LookupOverride for method '" + getMethodName() + "'; will return bean '" + this.beanName + "'";
|
||||
|
|
Loading…
Reference in New Issue