src/share/classes/jdk/internal/org/objectweb/asm/commons/Method.java
Print this page
@@ -101,37 +101,40 @@
}
/**
* Creates a new {@link Method}.
*
- * @param name the method's name.
- * @param desc the method's descriptor.
+ * @param name
+ * the method's name.
+ * @param desc
+ * the method's descriptor.
*/
public Method(final String name, final String desc) {
this.name = name;
this.desc = desc;
}
/**
* Creates a new {@link Method}.
*
- * @param name the method's name.
- * @param returnType the method's return type.
- * @param argumentTypes the method's argument types.
+ * @param name
+ * the method's name.
+ * @param returnType
+ * the method's return type.
+ * @param argumentTypes
+ * the method's argument types.
*/
- public Method(
- final String name,
- final Type returnType,
- final Type[] argumentTypes)
- {
+ public Method(final String name, final Type returnType,
+ final Type[] argumentTypes) {
this(name, Type.getMethodDescriptor(returnType, argumentTypes));
}
/**
* Creates a new {@link Method}.
*
- * @param m a java.lang.reflect method descriptor
+ * @param m
+ * a java.lang.reflect method descriptor
* @return a {@link Method} corresponding to the given Java method
* declaration.
*/
public static Method getMethod(java.lang.reflect.Method m) {
return new Method(m.getName(), Type.getMethodDescriptor(m));
@@ -138,11 +141,12 @@
}
/**
* Creates a new {@link Method}.
*
- * @param c a java.lang.reflect constructor descriptor
+ * @param c
+ * a java.lang.reflect constructor descriptor
* @return a {@link Method} corresponding to the given Java constructor
* declaration.
*/
public static Method getMethod(java.lang.reflect.Constructor<?> c) {
return new Method("<init>", Type.getConstructorDescriptor(c));
@@ -150,51 +154,51 @@
/**
* Returns a {@link Method} corresponding to the given Java method
* declaration.
*
- * @param method a Java method declaration, without argument names, of the
- * form "returnType name (argumentType1, ... argumentTypeN)", where
+ * @param method
+ * a Java method declaration, without argument names, of the form
+ * "returnType name (argumentType1, ... argumentTypeN)", where
* the types are in plain Java (e.g. "int", "float",
- * "java.util.List", ...). Classes of the java.lang package can be
- * specified by their unqualified name; all other classes names must
- * be fully qualified.
+ * "java.util.List", ...). Classes of the java.lang package can
+ * be specified by their unqualified name; all other classes
+ * names must be fully qualified.
* @return a {@link Method} corresponding to the given Java method
* declaration.
- * @throws IllegalArgumentException if <code>method</code> could not get
- * parsed.
+ * @throws IllegalArgumentException
+ * if <code>method</code> could not get parsed.
*/
public static Method getMethod(final String method)
- throws IllegalArgumentException
- {
+ throws IllegalArgumentException {
return getMethod(method, false);
}
/**
* Returns a {@link Method} corresponding to the given Java method
* declaration.
*
- * @param method a Java method declaration, without argument names, of the
- * form "returnType name (argumentType1, ... argumentTypeN)", where
+ * @param method
+ * a Java method declaration, without argument names, of the form
+ * "returnType name (argumentType1, ... argumentTypeN)", where
* the types are in plain Java (e.g. "int", "float",
- * "java.util.List", ...). Classes of the java.lang package may be
- * specified by their unqualified name, depending on the
+ * "java.util.List", ...). Classes of the java.lang package may
+ * be specified by their unqualified name, depending on the
* defaultPackage argument; all other classes names must be fully
* qualified.
- * @param defaultPackage true if unqualified class names belong to the
- * default package, or false if they correspond to java.lang classes.
- * For instance "Object" means "Object" if this option is true, or
+ * @param defaultPackage
+ * true if unqualified class names belong to the default package,
+ * or false if they correspond to java.lang classes. For instance
+ * "Object" means "Object" if this option is true, or
* "java.lang.Object" otherwise.
* @return a {@link Method} corresponding to the given Java method
* declaration.
- * @throws IllegalArgumentException if <code>method</code> could not get
- * parsed.
+ * @throws IllegalArgumentException
+ * if <code>method</code> could not get parsed.
*/
- public static Method getMethod(
- final String method,
- final boolean defaultPackage) throws IllegalArgumentException
- {
+ public static Method getMethod(final String method,
+ final boolean defaultPackage) throws IllegalArgumentException {
int space = method.indexOf(' ');
int start = method.indexOf('(', space) + 1;
int end = method.indexOf(')', start);
if (space == -1 || start == -1 || end == -1) {
throw new IllegalArgumentException();