comparison graal/com.oracle.max.asmdis/src/com/sun/max/asm/gen/ImmediateParameter.java @ 4142:bc8527f3071c

Adjust code base to new level of warnings.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 18 Dec 2011 05:24:06 +0100
parents e233f5660da4
children
comparison
equal deleted inserted replaced
4141:04d21be7a24f 4142:bc8527f3071c
32 public static final class Static { 32 public static final class Static {
33 33
34 private Static() { 34 private Static() {
35 } 35 }
36 36
37 @SafeVarargs
37 public static <Element_Type extends ImmediateArgument, Argument_Type> List<Element_Type> createSequence(Class<Element_Type> elementType, 38 public static <Element_Type extends ImmediateArgument, Argument_Type> List<Element_Type> createSequence(Class<Element_Type> elementType,
38 final Class<Argument_Type> argumentType, Argument_Type... values) throws NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException { 39 final Class<Argument_Type> argumentType, Argument_Type... values) throws NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException {
39 final List<Element_Type> result = new ArrayList<Element_Type>(); 40 final List<Element_Type> result = new ArrayList<>();
40 final Constructor<Element_Type> elementConstructor = elementType.getConstructor(argumentType); 41 final Constructor<Element_Type> elementConstructor = elementType.getConstructor(argumentType);
41 for (Argument_Type value : values) { 42 for (Argument_Type value : values) {
42 result.add(elementConstructor.newInstance(value)); 43 result.add(elementConstructor.newInstance(value));
43 } 44 }
44 return result; 45 return result;