Polishing
This commit is contained in:
parent
eb0ab8431b
commit
69587f3fa4
|
|
@ -52,6 +52,7 @@ public abstract class MethodOverride implements BeanMetadataElement {
|
|||
this.methodName = methodName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the name of the method to be overridden.
|
||||
*/
|
||||
|
|
@ -99,6 +100,7 @@ public abstract class MethodOverride implements BeanMetadataElement {
|
|||
*/
|
||||
public abstract boolean matches(Method method);
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (this == other) {
|
||||
|
|
|
|||
|
|
@ -174,7 +174,6 @@ abstract class ConstructorInjectedOverrides {
|
|||
return this.tb;
|
||||
}
|
||||
|
||||
|
||||
protected abstract FactoryMethods createFactoryMethods();
|
||||
|
||||
/**
|
||||
|
|
@ -229,7 +228,6 @@ class DerivedConstructorDependenciesBean extends ConstructorDependenciesBean {
|
|||
private void destroy() {
|
||||
this.destroyed = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -240,7 +238,6 @@ class DerivedConstructorDependenciesBean extends ConstructorDependenciesBean {
|
|||
interface DummyBo {
|
||||
|
||||
void something();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -258,9 +255,7 @@ class DummyBoImpl implements DummyBo {
|
|||
|
||||
@Override
|
||||
public void something() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -274,7 +269,6 @@ class DummyDao {
|
|||
public DummyDao(DataSource ds) {
|
||||
this.ds = ds;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -290,7 +284,6 @@ class DummyReferencer {
|
|||
|
||||
private DummyFactory dummyFactory;
|
||||
|
||||
|
||||
public DummyReferencer() {
|
||||
}
|
||||
|
||||
|
|
@ -321,7 +314,6 @@ class DummyReferencer {
|
|||
public TestBean getTestBean2() {
|
||||
return testBean2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -370,13 +362,11 @@ class FactoryMethods {
|
|||
return Collections.EMPTY_LIST;
|
||||
}
|
||||
|
||||
|
||||
private int num = 0;
|
||||
private String name = "default";
|
||||
private TestBean tb;
|
||||
private String stringValue;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor is private: not for use outside this class,
|
||||
* even by IoC container.
|
||||
|
|
@ -421,7 +411,6 @@ class FactoryMethods {
|
|||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -436,7 +425,6 @@ class FixedMethodReplacer implements MethodReplacer {
|
|||
public Object reimplement(Object obj, Method method, Object[] args) throws Throwable {
|
||||
return VALUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -469,22 +457,17 @@ class MethodReplaceCandidate {
|
|||
public String replaceMe(String echo) {
|
||||
return echo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Bean that exposes a simple property that can be set
|
||||
* to a mix of references and individual values.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @since 27.05.2003
|
||||
*/
|
||||
class MixedCollectionBean {
|
||||
|
||||
private Collection<?> jumble;
|
||||
|
||||
|
||||
public void setJumble(Collection<?> jumble) {
|
||||
this.jumble = jumble;
|
||||
}
|
||||
|
|
@ -492,7 +475,6 @@ class MixedCollectionBean {
|
|||
public Collection<?> getJumble() {
|
||||
return jumble;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -504,7 +486,6 @@ interface OverrideInterface {
|
|||
TestBean getPrototypeDependency();
|
||||
|
||||
TestBean getPrototypeDependency(Object someParam);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -563,7 +544,6 @@ abstract class OverrideOneMethodSubclass extends OverrideOneMethod {
|
|||
// This implementation does nothing!
|
||||
// It's not overloaded
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -591,7 +571,6 @@ class ProtectedLifecycleBean implements BeanNameAware, BeanFactoryAware, Initial
|
|||
|
||||
protected boolean destroyed;
|
||||
|
||||
|
||||
public void setInitMethodDeclared(boolean initMethodDeclared) {
|
||||
this.initMethodDeclared = initMethodDeclared;
|
||||
}
|
||||
|
|
@ -707,7 +686,6 @@ class ProtectedLifecycleBean implements BeanNameAware, BeanFactoryAware, Initial
|
|||
return bean;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -722,7 +700,6 @@ class ReverseMethodReplacer implements MethodReplacer, Serializable {
|
|||
String s = (String) args[0];
|
||||
return new StringBuffer(s).reverse().toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -733,7 +710,6 @@ class ReverseMethodReplacer implements MethodReplacer, Serializable {
|
|||
abstract class SerializableMethodReplacerCandidate extends MethodReplaceCandidate implements Serializable {
|
||||
|
||||
//public abstract Point getPoint();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -769,5 +745,4 @@ class SingleSimpleTypeConstructorBean {
|
|||
public String getTestString() {
|
||||
return testString;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -495,8 +495,7 @@ public abstract class ReflectionUtils {
|
|||
mc.doWith(method);
|
||||
}
|
||||
catch (IllegalAccessException ex) {
|
||||
throw new IllegalStateException("Shouldn't be illegal to access method '" + method.getName()
|
||||
+ "': " + ex);
|
||||
throw new IllegalStateException("Shouldn't be illegal to access method '" + method.getName() + "': " + ex);
|
||||
}
|
||||
}
|
||||
if (clazz.getSuperclass() != null) {
|
||||
|
|
@ -607,8 +606,7 @@ public abstract class ReflectionUtils {
|
|||
fc.doWith(field);
|
||||
}
|
||||
catch (IllegalAccessException ex) {
|
||||
throw new IllegalStateException(
|
||||
"Shouldn't be illegal to access field '" + field.getName() + "': " + ex);
|
||||
throw new IllegalStateException("Shouldn't be illegal to access field '" + field.getName() + "': " + ex);
|
||||
}
|
||||
}
|
||||
targetClass = targetClass.getSuperclass();
|
||||
|
|
@ -630,8 +628,8 @@ public abstract class ReflectionUtils {
|
|||
throw new IllegalArgumentException("Destination for field copy cannot be null");
|
||||
}
|
||||
if (!src.getClass().isAssignableFrom(dest.getClass())) {
|
||||
throw new IllegalArgumentException("Destination class [" + dest.getClass().getName()
|
||||
+ "] must be same or subclass as source class [" + src.getClass().getName() + "]");
|
||||
throw new IllegalArgumentException("Destination class [" + dest.getClass().getName() +
|
||||
"] must be same or subclass as source class [" + src.getClass().getName() + "]");
|
||||
}
|
||||
doWithFields(src.getClass(), new FieldCallback() {
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue