From f77bf2422ec1fbdb9db764b265fff1ad39c44eb2 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 9 Feb 2014 00:30:44 +0100 Subject: [PATCH] Polish Javadoc for LookupOverride and related code --- .../support/CglibSubclassingInstantiationStrategy.java | 6 +++--- .../beans/factory/support/LookupOverride.java | 10 ++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java index 4b2c763fc6..8165197900 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java @@ -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 method replacer 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(); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/LookupOverride.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/LookupOverride.java index 560943d309..75077729d5 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/LookupOverride.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/LookupOverride.java @@ -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 + "'";