diff --git a/springloaded/src/main/java/org/springsource/loaded/ExecutorBuilder.java b/springloaded/src/main/java/org/springsource/loaded/ExecutorBuilder.java index 8f1de84..ec73e7b 100644 --- a/springloaded/src/main/java/org/springsource/loaded/ExecutorBuilder.java +++ b/springloaded/src/main/java/org/springsource/loaded/ExecutorBuilder.java @@ -40,7 +40,7 @@ import org.objectweb.asm.Opcodes; * can be accessed through reflection). *

* Constructors. Constructors are added to the executor as ___init___ methods, with the invokespecials within them - * transformed, either removed if they are calls to Object. or mutated into ___init___ calls on the supertype instance. + * transformed, either removed if they are calls to Object.<init> or mutated into ___init___ calls on the supertype instance. * * @author Andy Clement * @since 0.5.0 diff --git a/springloaded/src/main/java/org/springsource/loaded/FieldReaderWriter.java b/springloaded/src/main/java/org/springsource/loaded/FieldReaderWriter.java index 3f16454..e57c7bd 100644 --- a/springloaded/src/main/java/org/springsource/loaded/FieldReaderWriter.java +++ b/springloaded/src/main/java/org/springsource/loaded/FieldReaderWriter.java @@ -55,7 +55,7 @@ public class FieldReaderWriter { * * @param instance the object instance upon which to set the field * @param newValue the new value for that field - * @param the optional state manager for this instance, which will be looked up (expensive) if not passed in + * @param stateManager the optional state manager for this instance, which will be looked up (expensive) if not passed in */ public void setValue(Object instance, Object newValue, ISMgr stateManager) throws IllegalAccessException { if (typeDescriptor.isReloadable()) { diff --git a/springloaded/src/main/java/org/springsource/loaded/InterfaceExtractor.java b/springloaded/src/main/java/org/springsource/loaded/InterfaceExtractor.java index e7d09a0..244be99 100644 --- a/springloaded/src/main/java/org/springsource/loaded/InterfaceExtractor.java +++ b/springloaded/src/main/java/org/springsource/loaded/InterfaceExtractor.java @@ -28,17 +28,17 @@ import org.objectweb.asm.MethodVisitor; * methods in the interface is that they contain an extra (leading) parameter that is the type of the original loaded class.
* For example:
* - *

+ * 

  * class Foo {
- * public String foo(int i) {}
+ *   public String foo(int i) {}
  * }
- * 
+ *
* * will cause creation of an interface method: * - *
+ * 
 
  * String foo(Foo instance, int i) {}
- * 
+ *
* * @author Andy Clement * @since 0.5.0 diff --git a/springloaded/src/main/java/org/springsource/loaded/LoadtimeInstrumentationPlugin.java b/springloaded/src/main/java/org/springsource/loaded/LoadtimeInstrumentationPlugin.java index c9f2ecc..81f89b2 100644 --- a/springloaded/src/main/java/org/springsource/loaded/LoadtimeInstrumentationPlugin.java +++ b/springloaded/src/main/java/org/springsource/loaded/LoadtimeInstrumentationPlugin.java @@ -35,7 +35,7 @@ public interface LoadtimeInstrumentationPlugin extends Plugin { * * @param slashedTypeName the type name, slashed form (e.g. java/lang/String) * @param classLoader the classloader loading the type - * @param protectionDomain + * @param protectionDomain the ProtectionDomain for the class represented by the bytes * @param bytes the classfile contents for the type * @return true if this plugin wants to change the bytes for the named type */ @@ -44,7 +44,7 @@ public interface LoadtimeInstrumentationPlugin extends Plugin { /** * Once accept has returned true for a type, the modify method will be called to make the actual change to the classfile bytes. * - * @param slashedTypeName the type name, slashed form (e.g. java/lang/String) + * @param slashedClassName the class name, slashed form (e.g. java/lang/String) * @param classLoader the classloader loading the type * @param bytes the classfile contents for the type * @return the new (modified) bytes for the class diff --git a/springloaded/src/main/java/org/springsource/loaded/PrefixTypePattern.java b/springloaded/src/main/java/org/springsource/loaded/PrefixTypePattern.java index 00d7d97..eab6425 100644 --- a/springloaded/src/main/java/org/springsource/loaded/PrefixTypePattern.java +++ b/springloaded/src/main/java/org/springsource/loaded/PrefixTypePattern.java @@ -26,11 +26,10 @@ public class PrefixTypePattern extends TypePattern { private String pattern; /** - * @param prefix prefix of the form 'com.foo.bar..*' + * @param pattern the prefix pattern of the form 'com.foo.bar..*' */ public PrefixTypePattern(String pattern) { - this.pattern = pattern.substring(0, pattern.length() - 2); // chop off - // the '.*' + this.pattern = pattern.substring(0, pattern.length() - 2); // chop off the '.*' } protected boolean internalMatches(String input) { diff --git a/springloaded/src/main/java/org/springsource/loaded/RTH.java b/springloaded/src/main/java/org/springsource/loaded/RTH.java index 6022fa5..3357f43 100644 --- a/springloaded/src/main/java/org/springsource/loaded/RTH.java +++ b/springloaded/src/main/java/org/springsource/loaded/RTH.java @@ -30,9 +30,12 @@ public class RTH { /** * Collapse a String and int into an array + * + * @param aString some string + * @param anInt some int */ - public static Object[] collapse(String arg0, int arg1) { - return new Object[] { arg0, Integer.valueOf(arg1) }; + public static Object[] collapse(String aString, int anInt) { + return new Object[] { aString, Integer.valueOf(anInt) }; } } diff --git a/springloaded/src/main/java/org/springsource/loaded/ReloadableType.java b/springloaded/src/main/java/org/springsource/loaded/ReloadableType.java index a0ab008..53a9e3f 100644 --- a/springloaded/src/main/java/org/springsource/loaded/ReloadableType.java +++ b/springloaded/src/main/java/org/springsource/loaded/ReloadableType.java @@ -172,6 +172,10 @@ public class ReloadableType { /** * Gets the 'orignal' method corresponding to given name and method descriptor. This only considers methods that exist in the * first (non-reloaded) version of the type. + * + * @param name method name + * @param descriptor method descriptor (e.g (Ljava/lang/String;)I) + * @return the MethodMember or an exception if not found */ // TODO introduce a cache for people trolling through the methods array? same for fields? public MethodMember getMethod(String name, String descriptor) { @@ -270,6 +274,9 @@ public class ReloadableType { /** * Load a new version of this type, using the specified suffix to tag the newly generated artifact class names. + * + * @param versionsuffix the String suffix to append to classnames being created for the reloaded class + * @param newbytedata the class bytes for the new version of this class */ public boolean loadNewVersion(String versionsuffix, byte[] newbytedata) { javaMethodCache = null; @@ -742,6 +749,11 @@ public class ReloadableType { /** * Gets the method corresponding to given name and descriptor, taking into consideration changes that have happened by * reloading. + * + * @param name the member name + * @param descriptor the member descriptor (e.g. (Ljava/lang/String;)I) + * @return the MethodMember for that name and descriptor. Null if not found on a live version, or an exception if there is no live version and + * it cannot be found. */ public MethodMember getCurrentMethod(String name, String descriptor) { if (liveVersion == null) { @@ -1186,7 +1198,7 @@ public class ReloadableType { * * @param instance the object upon which to set the field (maybe null for static fields) * @param fieldname the name of the field - * @param + * @param isStatic whether the field is static * @param newValue the new value to put into the field */ public void setField(Object instance, String fieldname, boolean isStatic, Object newValue) throws IllegalAccessException { @@ -1219,8 +1231,7 @@ public class ReloadableType { * * @param instance the object upon which to set the field (maybe null for static fields) * @param fieldname the name of the field - * @param - * @param newValue the new value to put into the field + * @param isStatic whether the field is static or not */ public Object getField(Object instance, String fieldname, boolean isStatic) throws IllegalAccessException { FieldReaderWriter fieldReaderWriter = locateField(fieldname); diff --git a/springloaded/src/main/java/org/springsource/loaded/SystemClassReflectionRewriter.java b/springloaded/src/main/java/org/springsource/loaded/SystemClassReflectionRewriter.java index 127655a..44e3852 100644 --- a/springloaded/src/main/java/org/springsource/loaded/SystemClassReflectionRewriter.java +++ b/springloaded/src/main/java/org/springsource/loaded/SystemClassReflectionRewriter.java @@ -47,6 +47,7 @@ import org.objectweb.asm.Opcodes; *
  • getDeclaredConstructor *
  • getDeclaredMethods *
  • getDeclaredMethod
  • + * *

    * Due to ProxyGenerator *