@@ -0,0 +1,25 @@ | |||
public class SimpleVarargs { | |||
public SimpleVarargs(Integer... strings) {} | |||
public void foo(Integer... strings) { } | |||
//public void bar(Integer[] array) { } | |||
public void fooInt(int i,Integer... strings) {} | |||
//public void barInt(int i,Integer[] strings) {} | |||
public static void main(String[] argv) { | |||
SimpleVarargs s = new SimpleVarargs(new Integer(45)); | |||
s.foo(new Integer(45)); | |||
s.foo(new Integer(45),new Integer(45)); | |||
s.foo(new Integer[]{new Integer(45),new Integer(45)}); | |||
// s.bar(new Integer[]{new Integer(45),new Integer(45)}); | |||
s.fooInt(1,new Integer(45)); | |||
s.fooInt(2,new Integer(45),new Integer(45)); | |||
s.fooInt(3,new Integer[]{new Integer(45),new Integer(45)}); | |||
// s.barInt(4,new Integer[]{new Integer(45),new Integer(45)}); | |||
} | |||
} |
@@ -0,0 +1,5 @@ | |||
public aspect VarargsAspect01 { | |||
before(): call(* *(Integer[])) { } | |||
} |
@@ -0,0 +1,5 @@ | |||
public aspect VarargsAspect02 { | |||
before(): execution(* *(Integer[])) { } | |||
} |
@@ -0,0 +1,5 @@ | |||
public aspect VarargsAspect03 { | |||
before(): initialization(new(Integer[])) { } | |||
} |
@@ -0,0 +1,5 @@ | |||
public aspect VarargsAspect04 { | |||
before(): withincode(* *(Integer[])) && call(* *(..)) { } | |||
} |
@@ -0,0 +1,11 @@ | |||
<project name="Java 5 compilation of test source" default="default" basedir="."> | |||
<target name="default" > | |||
<delete dir="output" failonerror="false"/> | |||
<mkdir dir="output"/> | |||
<javac destdir="output" debug="on" srcdir="." includes="*.java"/> | |||
<zip file="testcode.jar" basedir="output" includes="**/*"/> | |||
<delete dir="output"/> | |||
</target> | |||
</project> |