diff options
Diffstat (limited to 'test/resources/design')
82 files changed, 1958 insertions, 0 deletions
diff --git a/test/resources/design/designfiles/arraydepend.xml b/test/resources/design/designfiles/arraydepend.xml new file mode 100644 index 0000000..cdd0aeb --- /dev/null +++ b/test/resources/design/designfiles/arraydepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.arraydepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/arraydepend2.xml b/test/resources/design/designfiles/arraydepend2.xml new file mode 100644 index 0000000..ab8d8e4 --- /dev/null +++ b/test/resources/design/designfiles/arraydepend2.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.arraydepend2"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/arraydepend3.xml b/test/resources/design/designfiles/arraydepend3.xml new file mode 100644 index 0000000..1e30b7c --- /dev/null +++ b/test/resources/design/designfiles/arraydepend3.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.arraydepend3"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/badxml.xml b/test/resources/design/designfiles/badxml.xml new file mode 100644 index 0000000..63c82f0 --- /dev/null +++ b/test/resources/design/designfiles/badxml.xml @@ -0,0 +1,6 @@ +<design + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.arraydepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/castdepend.xml b/test/resources/design/designfiles/castdepend.xml new file mode 100644 index 0000000..ac16d41 --- /dev/null +++ b/test/resources/design/designfiles/castdepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.castdepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/catchdepend.xml b/test/resources/design/designfiles/catchdepend.xml new file mode 100644 index 0000000..2ff6387 --- /dev/null +++ b/test/resources/design/designfiles/catchdepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.catchdepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/declarejavautil.xml b/test/resources/design/designfiles/declarejavautil.xml new file mode 100644 index 0000000..e2fb08e --- /dev/null +++ b/test/resources/design/designfiles/declarejavautil.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.declarejavautil"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/declarejavautilfail.xml b/test/resources/design/designfiles/declarejavautilfail.xml new file mode 100644 index 0000000..fd43256 --- /dev/null +++ b/test/resources/design/designfiles/declarejavautilfail.xml @@ -0,0 +1,8 @@ +<design> +<!-- needdeclarations is by default true, so we don't need that here --> +<package name="javautil" package="java.util"/> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.declarejavautil"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/declarejavax.xml b/test/resources/design/designfiles/declarejavax.xml new file mode 100644 index 0000000..f2b7d13 --- /dev/null +++ b/test/resources/design/designfiles/declarejavax.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.declarejavax"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/declarejavaxpass.xml b/test/resources/design/designfiles/declarejavaxpass.xml new file mode 100644 index 0000000..7e55849 --- /dev/null +++ b/test/resources/design/designfiles/declarejavaxpass.xml @@ -0,0 +1,7 @@ +<design> +<package name="swing" package="javax.swing" needdeclarations="false"/> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.declarejavax"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/fielddepend.xml b/test/resources/design/designfiles/fielddepend.xml new file mode 100644 index 0000000..409427c --- /dev/null +++ b/test/resources/design/designfiles/fielddepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.fielddepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/fieldrefdepend.xml b/test/resources/design/designfiles/fieldrefdepend.xml new file mode 100644 index 0000000..3a04f6a --- /dev/null +++ b/test/resources/design/designfiles/fieldrefdepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.fieldrefdepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/innerclassdepend.xml b/test/resources/design/designfiles/innerclassdepend.xml new file mode 100644 index 0000000..2be90f6 --- /dev/null +++ b/test/resources/design/designfiles/innerclassdepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.innerclassdepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/instanceofdepend.xml b/test/resources/design/designfiles/instanceofdepend.xml new file mode 100644 index 0000000..2e9a3f8 --- /dev/null +++ b/test/resources/design/designfiles/instanceofdepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.instanceofdepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/interfacedepend.xml b/test/resources/design/designfiles/interfacedepend.xml new file mode 100644 index 0000000..9f11581 --- /dev/null +++ b/test/resources/design/designfiles/interfacedepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.interfacedepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/localvardepend.xml b/test/resources/design/designfiles/localvardepend.xml new file mode 100644 index 0000000..518bae1 --- /dev/null +++ b/test/resources/design/designfiles/localvardepend.xml @@ -0,0 +1,9 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="factory" package="mod.temp" depends="dummy"/> +<package name="client" package="mod.localvardepend"> + <depends>factory</depends> +</package> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/localvarrefdepend.xml b/test/resources/design/designfiles/localvarrefdepend.xml new file mode 100644 index 0000000..6160330 --- /dev/null +++ b/test/resources/design/designfiles/localvarrefdepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.localvarrefdepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/missingattribute.xml b/test/resources/design/designfiles/missingattribute.xml new file mode 100644 index 0000000..5397c51 --- /dev/null +++ b/test/resources/design/designfiles/missingattribute.xml @@ -0,0 +1,6 @@ +<design> + +<package package="mod.dummy"/> +<package name="client" package="mod.arraydepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/multipleerrors.xml b/test/resources/design/designfiles/multipleerrors.xml new file mode 100644 index 0000000..3c6780d --- /dev/null +++ b/test/resources/design/designfiles/multipleerrors.xml @@ -0,0 +1,7 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.arraydepend"/> +<package name="client2" package="mod.catchdepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/newdepend.xml b/test/resources/design/designfiles/newdepend.xml new file mode 100644 index 0000000..b924645 --- /dev/null +++ b/test/resources/design/designfiles/newdepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.newdepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/newdepend2.xml b/test/resources/design/designfiles/newdepend2.xml new file mode 100644 index 0000000..4efc5bf --- /dev/null +++ b/test/resources/design/designfiles/newdepend2.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.newdepend2"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/nodebugoption.xml b/test/resources/design/designfiles/nodebugoption.xml new file mode 100644 index 0000000..8ab00b7 --- /dev/null +++ b/test/resources/design/designfiles/nodebugoption.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.nodebugoption"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/nojar.xml b/test/resources/design/designfiles/nojar.xml new file mode 100644 index 0000000..cdd0aeb --- /dev/null +++ b/test/resources/design/designfiles/nojar.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.arraydepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/paramdepend.xml b/test/resources/design/designfiles/paramdepend.xml new file mode 100644 index 0000000..4c24f4f --- /dev/null +++ b/test/resources/design/designfiles/paramdepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.paramdepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/passlocaldepend.xml b/test/resources/design/designfiles/passlocaldepend.xml new file mode 100644 index 0000000..8544ed5 --- /dev/null +++ b/test/resources/design/designfiles/passlocaldepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.passlocaldepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/pathelementpath.xml b/test/resources/design/designfiles/pathelementpath.xml new file mode 100644 index 0000000..84bd103 --- /dev/null +++ b/test/resources/design/designfiles/pathelementpath.xml @@ -0,0 +1,7 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client1" package="mod.putstatic"/> +<package name="client2" package="mod.arraydepend2"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/putstatic.xml b/test/resources/design/designfiles/putstatic.xml new file mode 100644 index 0000000..92464e0 --- /dev/null +++ b/test/resources/design/designfiles/putstatic.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.putstatic"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/recursion.xml b/test/resources/design/designfiles/recursion.xml new file mode 100644 index 0000000..9aedd9e --- /dev/null +++ b/test/resources/design/designfiles/recursion.xml @@ -0,0 +1,6 @@ +<design> + +<package name="temp" package="mod.recursion.rec" subpackages="include"/> +<package name="client" package="mod.recursion.client" depends="temp"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/recursion2.xml b/test/resources/design/designfiles/recursion2.xml new file mode 100644 index 0000000..94b41cd --- /dev/null +++ b/test/resources/design/designfiles/recursion2.xml @@ -0,0 +1,6 @@ +<design> + +<package name="temp" package="mod.recursion2.dependency"/> +<package name="client" package="mod.recursion2.rec" depends="temp" subpackages="include"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/recursion3.xml b/test/resources/design/designfiles/recursion3.xml new file mode 100644 index 0000000..7fef148 --- /dev/null +++ b/test/resources/design/designfiles/recursion3.xml @@ -0,0 +1,5 @@ +<design> + +<package name="recursion" package="mod.recursion3" subpackages="include"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/returnvaldepend.xml b/test/resources/design/designfiles/returnvaldepend.xml new file mode 100644 index 0000000..d1abdab --- /dev/null +++ b/test/resources/design/designfiles/returnvaldepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.returnvaldepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/signatureexceptiondepend.xml b/test/resources/design/designfiles/signatureexceptiondepend.xml new file mode 100644 index 0000000..446333e --- /dev/null +++ b/test/resources/design/designfiles/signatureexceptiondepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.signatureexceptiondepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/staticdepend.xml b/test/resources/design/designfiles/staticdepend.xml new file mode 100644 index 0000000..94e41c8 --- /dev/null +++ b/test/resources/design/designfiles/staticdepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.staticdepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/staticfield2depend.xml b/test/resources/design/designfiles/staticfield2depend.xml new file mode 100644 index 0000000..69a1e4f --- /dev/null +++ b/test/resources/design/designfiles/staticfield2depend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.staticfield2depend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/staticfielddepend.xml b/test/resources/design/designfiles/staticfielddepend.xml new file mode 100644 index 0000000..d477496 --- /dev/null +++ b/test/resources/design/designfiles/staticfielddepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.staticfielddepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/staticfinaldepend.xml b/test/resources/design/designfiles/staticfinaldepend.xml new file mode 100644 index 0000000..a264547 --- /dev/null +++ b/test/resources/design/designfiles/staticfinaldepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.staticfinaldepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/superdepend.xml b/test/resources/design/designfiles/superdepend.xml new file mode 100644 index 0000000..153ee2b --- /dev/null +++ b/test/resources/design/designfiles/superdepend.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.superdepend"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/warfailure.xml b/test/resources/design/designfiles/warfailure.xml new file mode 100644 index 0000000..daf5368 --- /dev/null +++ b/test/resources/design/designfiles/warfailure.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.warfailure"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/designfiles/warsuccess.xml b/test/resources/design/designfiles/warsuccess.xml new file mode 100644 index 0000000..3e100e9 --- /dev/null +++ b/test/resources/design/designfiles/warsuccess.xml @@ -0,0 +1,6 @@ +<design> + +<package name="dummy" package="mod.dummy"/> +<package name="client" package="mod.warsuccess" depends="dummy"/> + +</design>
\ No newline at end of file diff --git a/test/resources/design/src/mod/arraydepend/ClassDependsOnArray.java b/test/resources/design/src/mod/arraydepend/ClassDependsOnArray.java new file mode 100644 index 0000000..ed4b01c --- /dev/null +++ b/test/resources/design/src/mod/arraydepend/ClassDependsOnArray.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 9, 2005 + */ +package mod.arraydepend; + +import mod.dummy.DummyClass; + +/** + * + * @author dhiller + */ +public class ClassDependsOnArray { + + public void something() { + Object[] o = new DummyClass[5]; + } +} diff --git a/test/resources/design/src/mod/arraydepend2/ClassDependsOnArray.java b/test/resources/design/src/mod/arraydepend2/ClassDependsOnArray.java new file mode 100644 index 0000000..4d65a7a --- /dev/null +++ b/test/resources/design/src/mod/arraydepend2/ClassDependsOnArray.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 9, 2005 + */ +package mod.arraydepend2; + + + +/** + * + * @author dhiller + */ +public class ClassDependsOnArray { + + public void testArray() throws Exception { + Class c = String[].class; + } +} diff --git a/test/resources/design/src/mod/arraydepend3/ClassDependsOnArray.java b/test/resources/design/src/mod/arraydepend3/ClassDependsOnArray.java new file mode 100644 index 0000000..2ff6d67 --- /dev/null +++ b/test/resources/design/src/mod/arraydepend3/ClassDependsOnArray.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 9, 2005 + */ +package mod.arraydepend3; + +import mod.dummy.DummyClass; + + + +/** + * + * @author dhiller + */ +public class ClassDependsOnArray { + + public void testArray() throws Exception { + Class c = DummyClass[].class; + } +} diff --git a/test/resources/design/src/mod/castdepend/ClassDependsOnCast.java b/test/resources/design/src/mod/castdepend/ClassDependsOnCast.java new file mode 100644 index 0000000..b6ad33a --- /dev/null +++ b/test/resources/design/src/mod/castdepend/ClassDependsOnCast.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.castdepend; + +import mod.dummy.DummyInterface; + +/** + * + * @author dhiller + */ +public class ClassDependsOnCast { + + public void getSomething(Object obj) { + Object o = (DummyInterface)obj; + } +} diff --git a/test/resources/design/src/mod/catchdepend/ClassDependsOnCatch.java b/test/resources/design/src/mod/catchdepend/ClassDependsOnCatch.java new file mode 100644 index 0000000..a103240 --- /dev/null +++ b/test/resources/design/src/mod/catchdepend/ClassDependsOnCatch.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.catchdepend; + +import mod.dummy.DummyRuntimeException; + +/** + * + * @author dhiller + */ +public class ClassDependsOnCatch { + + public void doNothing() { + try { + int x = 0; + int y = x+4; + } catch(DummyRuntimeException e) { + + } + } +} diff --git a/test/resources/design/src/mod/declarejavautil/ClassDependsOnJavaUtil.java b/test/resources/design/src/mod/declarejavautil/ClassDependsOnJavaUtil.java new file mode 100644 index 0000000..077da65 --- /dev/null +++ b/test/resources/design/src/mod/declarejavautil/ClassDependsOnJavaUtil.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 19, 2005 + */ +package mod.declarejavautil; + +import java.util.List; + +/** + * + * @author dhiller + */ +public class ClassDependsOnJavaUtil { + + public List list; +} diff --git a/test/resources/design/src/mod/declarejavax/ClassDependsOnJavax.java b/test/resources/design/src/mod/declarejavax/ClassDependsOnJavax.java new file mode 100644 index 0000000..cd79675 --- /dev/null +++ b/test/resources/design/src/mod/declarejavax/ClassDependsOnJavax.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 19, 2005 + */ +package mod.declarejavax; + +import javax.swing.JButton; + +/** + * + * @author dhiller + */ +public class ClassDependsOnJavax { + + public JButton b = null; + +} diff --git a/test/resources/design/src/mod/dummy/DummyClass.java b/test/resources/design/src/mod/dummy/DummyClass.java new file mode 100644 index 0000000..f2f48df --- /dev/null +++ b/test/resources/design/src/mod/dummy/DummyClass.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.dummy; + +/** + * + * @author dhiller + */ +public class DummyClass { + + public static final String CONSTANT = "asdf"; + public static String staticField = "xxxx"; + + public static String returnSomething() { + return "Xxx"; + } +} diff --git a/test/resources/design/src/mod/dummy/DummyException.java b/test/resources/design/src/mod/dummy/DummyException.java new file mode 100644 index 0000000..3884fc1 --- /dev/null +++ b/test/resources/design/src/mod/dummy/DummyException.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.dummy; + +/** + * + * @author dhiller + */ +public class DummyException extends Exception { + +} diff --git a/test/resources/design/src/mod/dummy/DummyInterface.java b/test/resources/design/src/mod/dummy/DummyInterface.java new file mode 100644 index 0000000..e7432fa --- /dev/null +++ b/test/resources/design/src/mod/dummy/DummyInterface.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.dummy; + +/** + * + * @author dhiller + */ +public interface DummyInterface { + +} diff --git a/test/resources/design/src/mod/dummy/DummyRuntimeException.java b/test/resources/design/src/mod/dummy/DummyRuntimeException.java new file mode 100644 index 0000000..53cb35a --- /dev/null +++ b/test/resources/design/src/mod/dummy/DummyRuntimeException.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.dummy; + +/** + * + * @author dhiller + */ +public class DummyRuntimeException extends RuntimeException { + +} diff --git a/test/resources/design/src/mod/fielddepend/ClassDependsOnField.java b/test/resources/design/src/mod/fielddepend/ClassDependsOnField.java new file mode 100644 index 0000000..226003b --- /dev/null +++ b/test/resources/design/src/mod/fielddepend/ClassDependsOnField.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.fielddepend; + +import mod.dummy.DummyClass; + +/** + * This class depends on a field in another package. + * + * @author dhiller + */ +public class ClassDependsOnField { + + private DummyClass f; +} diff --git a/test/resources/design/src/mod/fieldrefdepend/ClassDependsOnReferenceInFieldDeclaration.java b/test/resources/design/src/mod/fieldrefdepend/ClassDependsOnReferenceInFieldDeclaration.java new file mode 100644 index 0000000..8329bfc --- /dev/null +++ b/test/resources/design/src/mod/fieldrefdepend/ClassDependsOnReferenceInFieldDeclaration.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.fieldrefdepend; + +import mod.dummy.DummyClass; + +/** + * + * @author dhiller + */ +public class ClassDependsOnReferenceInFieldDeclaration { + + private Class c = DummyClass.class; + +} diff --git a/test/resources/design/src/mod/innerclassdepend/InnerClassDependsOnSuper.java b/test/resources/design/src/mod/innerclassdepend/InnerClassDependsOnSuper.java new file mode 100644 index 0000000..ee882e5 --- /dev/null +++ b/test/resources/design/src/mod/innerclassdepend/InnerClassDependsOnSuper.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.innerclassdepend; + +import mod.dummy.DummyClass; + +/** + * + * @author dhiller + */ +public class InnerClassDependsOnSuper { + + private class Inner extends DummyClass { + + } +} diff --git a/test/resources/design/src/mod/instanceofdepend/ClassDependsOnInstanceOf.java b/test/resources/design/src/mod/instanceofdepend/ClassDependsOnInstanceOf.java new file mode 100644 index 0000000..55a78bb --- /dev/null +++ b/test/resources/design/src/mod/instanceofdepend/ClassDependsOnInstanceOf.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.instanceofdepend; + +import mod.dummy.DummyInterface; + +/** + * + * @author dhiller + */ +public class ClassDependsOnInstanceOf { + + public void getSomething(Object o) { + int x = 0; + if(o instanceof DummyInterface) { + x = 4; + } + } +} diff --git a/test/resources/design/src/mod/interfacedepend/ClassDependsOnInterfaceMod2.java b/test/resources/design/src/mod/interfacedepend/ClassDependsOnInterfaceMod2.java new file mode 100644 index 0000000..6713b1c --- /dev/null +++ b/test/resources/design/src/mod/interfacedepend/ClassDependsOnInterfaceMod2.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.interfacedepend; + +import mod.dummy.DummyInterface; + +/** + * This class depends on an interface in another package creating a dependency + * between packages. + * + * @author dhiller + */ +public class ClassDependsOnInterfaceMod2 implements DummyInterface { + +} diff --git a/test/resources/design/src/mod/localvardepend/ClassDependsOnLocalVar.java b/test/resources/design/src/mod/localvardepend/ClassDependsOnLocalVar.java new file mode 100644 index 0000000..cd177da --- /dev/null +++ b/test/resources/design/src/mod/localvardepend/ClassDependsOnLocalVar.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.localvardepend; + +import mod.dummy.DummyClass; + +/** + * + * @author dhiller + */ +public class ClassDependsOnLocalVar { + + public String doNothing() { + DummyClass c = null; + + return ""+c; + } +} diff --git a/test/resources/design/src/mod/localvarrefdepend/ClassDependsOnLocalVariableReference.java b/test/resources/design/src/mod/localvarrefdepend/ClassDependsOnLocalVariableReference.java new file mode 100644 index 0000000..8e77433 --- /dev/null +++ b/test/resources/design/src/mod/localvarrefdepend/ClassDependsOnLocalVariableReference.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.localvarrefdepend; + +import mod.dummy.DummyInterface; + +/** + * + * @author dhiller + */ +public class ClassDependsOnLocalVariableReference { + + public void doNothing() { + Class c = DummyInterface.class; + } +} diff --git a/test/resources/design/src/mod/newdepend/ClassDependsOnNew.java b/test/resources/design/src/mod/newdepend/ClassDependsOnNew.java new file mode 100644 index 0000000..efcaa49 --- /dev/null +++ b/test/resources/design/src/mod/newdepend/ClassDependsOnNew.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.newdepend; + +import mod.dummy.DummyClass; + +/** + * + * @author dhiller + */ +public class ClassDependsOnNew { + + public void doNothing() { + new DummyClass(); + } +} diff --git a/test/resources/design/src/mod/newdepend2/ClassDependsOnNewInField.java b/test/resources/design/src/mod/newdepend2/ClassDependsOnNewInField.java new file mode 100644 index 0000000..d76ade3 --- /dev/null +++ b/test/resources/design/src/mod/newdepend2/ClassDependsOnNewInField.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.newdepend2; + +import mod.dummy.DummyClass; + +/** + * + * @author dhiller + */ +public class ClassDependsOnNewInField { + + public Object o = new DummyClass(); +} diff --git a/test/resources/design/src/mod/nodebugoption/ClassDependsOnLocalVar.java b/test/resources/design/src/mod/nodebugoption/ClassDependsOnLocalVar.java new file mode 100644 index 0000000..bb65e63 --- /dev/null +++ b/test/resources/design/src/mod/nodebugoption/ClassDependsOnLocalVar.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 13, 2005 + */ +package mod.nodebugoption; + +import mod.dummy.DummyClass; + +/** + * + * @author dhiller + */ +public class ClassDependsOnLocalVar { + + public void doSomething() { + DummyClass c = null; + //without debug option enabled, the type DummyClass is lost so we + //must fail with the error saying class wasn't compiled with -g option + //enabled in javac. + } +} diff --git a/test/resources/design/src/mod/paramdepend/ClassDependsOnParameter.java b/test/resources/design/src/mod/paramdepend/ClassDependsOnParameter.java new file mode 100644 index 0000000..12866b1 --- /dev/null +++ b/test/resources/design/src/mod/paramdepend/ClassDependsOnParameter.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.paramdepend; + +import mod.dummy.DummyClass; + +/** + * + * @author dhiller + */ +public class ClassDependsOnParameter { + + public void setSomething(String dummy, DummyClass c) { + + } +} diff --git a/test/resources/design/src/mod/passlocaldepend/ClassDependsOnClassInSamePackage.java b/test/resources/design/src/mod/passlocaldepend/ClassDependsOnClassInSamePackage.java new file mode 100644 index 0000000..a2ae720 --- /dev/null +++ b/test/resources/design/src/mod/passlocaldepend/ClassDependsOnClassInSamePackage.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 13, 2005 + */ +package mod.passlocaldepend; + +/** + * + * @author dhiller + */ +public class ClassDependsOnClassInSamePackage { + + public void doSomething(FakeClass c) { + + } +} diff --git a/test/resources/design/src/mod/passlocaldepend/FakeClass.java b/test/resources/design/src/mod/passlocaldepend/FakeClass.java new file mode 100644 index 0000000..ed35025 --- /dev/null +++ b/test/resources/design/src/mod/passlocaldepend/FakeClass.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 13, 2005 + */ +package mod.passlocaldepend; + +/** + * + * @author dhiller + */ +public class FakeClass { + +} diff --git a/test/resources/design/src/mod/putstatic/ClassDependsOnNothing.java b/test/resources/design/src/mod/putstatic/ClassDependsOnNothing.java new file mode 100644 index 0000000..fbedddf --- /dev/null +++ b/test/resources/design/src/mod/putstatic/ClassDependsOnNothing.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 13, 2005 + */ +package mod.putstatic; + + +/** + * + * @author dhiller + */ +public class ClassDependsOnNothing { + + private static String s; + public static void setJarLocator(String l) { + s = l; + } +} diff --git a/test/resources/design/src/mod/recursion/client/ClassDependsOnSubPackage.java b/test/resources/design/src/mod/recursion/client/ClassDependsOnSubPackage.java new file mode 100644 index 0000000..ce95d9c --- /dev/null +++ b/test/resources/design/src/mod/recursion/client/ClassDependsOnSubPackage.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 13, 2005 + */ +package mod.recursion.client; + +import mod.recursion.rec.a.FakeClass; + +/** + * + * @author dhiller + */ +public class ClassDependsOnSubPackage { + + public FakeClass getSoemthing() { + return null; + } +} diff --git a/test/resources/design/src/mod/recursion/rec/a/FakeClass.java b/test/resources/design/src/mod/recursion/rec/a/FakeClass.java new file mode 100644 index 0000000..ada6615 --- /dev/null +++ b/test/resources/design/src/mod/recursion/rec/a/FakeClass.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 13, 2005 + */ +package mod.recursion.rec.a; + +/** + * + * @author dhiller + */ +public class FakeClass { + +} diff --git a/test/resources/design/src/mod/recursion2/dependency/Dependency.java b/test/resources/design/src/mod/recursion2/dependency/Dependency.java new file mode 100644 index 0000000..dc9b594 --- /dev/null +++ b/test/resources/design/src/mod/recursion2/dependency/Dependency.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 13, 2005 + */ +package mod.recursion2.dependency; + +/** + * + * @author dhiller + */ +public class Dependency { + +} diff --git a/test/resources/design/src/mod/recursion2/rec/client/SubpackageClassDependsOnPackage.java b/test/resources/design/src/mod/recursion2/rec/client/SubpackageClassDependsOnPackage.java new file mode 100644 index 0000000..57dc96a --- /dev/null +++ b/test/resources/design/src/mod/recursion2/rec/client/SubpackageClassDependsOnPackage.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 16, 2005 + */ +package mod.recursion2.rec.client; + +import mod.recursion2.dependency.Dependency; + +/** + * + * @author dhiller + */ +public class SubpackageClassDependsOnPackage { + + public Dependency doNothing() { + return null; + } +} diff --git a/test/resources/design/src/mod/recursion3/client/SubpackageClassDependsOnSubpackage.java b/test/resources/design/src/mod/recursion3/client/SubpackageClassDependsOnSubpackage.java new file mode 100644 index 0000000..64dd1ce --- /dev/null +++ b/test/resources/design/src/mod/recursion3/client/SubpackageClassDependsOnSubpackage.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 16, 2005 + */ +package mod.recursion3.client; + +import mod.recursion3.svc.DependencyClass; + +/** + * + * @author dhiller + */ +public class SubpackageClassDependsOnSubpackage { + + public void doSomething(DependencyClass c) { + + } +} diff --git a/test/resources/design/src/mod/recursion3/svc/DependencyClass.java b/test/resources/design/src/mod/recursion3/svc/DependencyClass.java new file mode 100644 index 0000000..e3bc462 --- /dev/null +++ b/test/resources/design/src/mod/recursion3/svc/DependencyClass.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 16, 2005 + */ +package mod.recursion3.svc; + +/** + * + * @author dhiller + */ +public class DependencyClass { + +} diff --git a/test/resources/design/src/mod/returnvaldepend/ClassDependsOnReturnValue.java b/test/resources/design/src/mod/returnvaldepend/ClassDependsOnReturnValue.java new file mode 100644 index 0000000..61f00ae --- /dev/null +++ b/test/resources/design/src/mod/returnvaldepend/ClassDependsOnReturnValue.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.returnvaldepend; + +import mod.dummy.DummyInterface; + +/** + * + * @author dhiller + */ +public class ClassDependsOnReturnValue { + + public DummyInterface getSomething() { + return null; + } +} diff --git a/test/resources/design/src/mod/signatureexceptiondepend/ClassDependsOnExceptionInMethodSignature.java b/test/resources/design/src/mod/signatureexceptiondepend/ClassDependsOnExceptionInMethodSignature.java new file mode 100644 index 0000000..a235e12 --- /dev/null +++ b/test/resources/design/src/mod/signatureexceptiondepend/ClassDependsOnExceptionInMethodSignature.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.signatureexceptiondepend; + +import mod.dummy.DummyException; + +/** + * + * @author dhiller + */ +public class ClassDependsOnExceptionInMethodSignature { + + public String doNothing() throws DummyException { + return null; + } +} diff --git a/test/resources/design/src/mod/staticdepend/ClassDependsOnStatic.java b/test/resources/design/src/mod/staticdepend/ClassDependsOnStatic.java new file mode 100644 index 0000000..60b1f53 --- /dev/null +++ b/test/resources/design/src/mod/staticdepend/ClassDependsOnStatic.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.staticdepend; + +import mod.dummy.DummyClass; + +/** + * + * @author dhiller + */ +public class ClassDependsOnStatic { + + public String getSomething() { + return DummyClass.returnSomething(); + } +} diff --git a/test/resources/design/src/mod/staticfield2depend/ClassDependsOnStaticField.java b/test/resources/design/src/mod/staticfield2depend/ClassDependsOnStaticField.java new file mode 100644 index 0000000..6d2a587 --- /dev/null +++ b/test/resources/design/src/mod/staticfield2depend/ClassDependsOnStaticField.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 9, 2005 + */ +package mod.staticfield2depend; + +import mod.dummy.DummyClass; + +/** + * + * @author dhiller + */ +public class ClassDependsOnStaticField { + + public static DummyClass x = null; + + +} diff --git a/test/resources/design/src/mod/staticfielddepend/ClassDependsOnStaticField.java b/test/resources/design/src/mod/staticfielddepend/ClassDependsOnStaticField.java new file mode 100644 index 0000000..67f35db --- /dev/null +++ b/test/resources/design/src/mod/staticfielddepend/ClassDependsOnStaticField.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 9, 2005 + */ +package mod.staticfielddepend; + +import mod.dummy.DummyClass; + +/** + * + * @author dhiller + */ +public class ClassDependsOnStaticField { + + public void doNothing() { + String s = DummyClass.staticField; + } +} diff --git a/test/resources/design/src/mod/staticfinaldepend/ClassDependsOnConstant.java b/test/resources/design/src/mod/staticfinaldepend/ClassDependsOnConstant.java new file mode 100644 index 0000000..6273c9a --- /dev/null +++ b/test/resources/design/src/mod/staticfinaldepend/ClassDependsOnConstant.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 9, 2005 + */ +package mod.staticfinaldepend; + +import mod.dummy.DummyClass; + +/** + * + * @author dhiller + */ +public class ClassDependsOnConstant { + + public void doNothing() { + String s = ""+DummyClass.CONSTANT; + } +} diff --git a/test/resources/design/src/mod/superdepend/ClassDependsOnSuperMod2.java b/test/resources/design/src/mod/superdepend/ClassDependsOnSuperMod2.java new file mode 100644 index 0000000..880f757 --- /dev/null +++ b/test/resources/design/src/mod/superdepend/ClassDependsOnSuperMod2.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.superdepend; + +import mod.dummy.DummyClass; + +/** + * This class depends on a superclass in another package creating a dependency + * between packages. + * @author dhiller + */ +public class ClassDependsOnSuperMod2 extends DummyClass { + +} diff --git a/test/resources/design/src/mod/temp/Factory.java b/test/resources/design/src/mod/temp/Factory.java new file mode 100644 index 0000000..a05622e --- /dev/null +++ b/test/resources/design/src/mod/temp/Factory.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Jan 13, 2005 + */ +package mod.temp; + +import mod.dummy.DummyClass; + +/** + * + * @author dhiller + */ +public class Factory { + + public static DummyClass create() { + return new DummyClass(); + } +} diff --git a/test/resources/design/src/mod/warfailure/ClassDependsOnSuperMod2.java b/test/resources/design/src/mod/warfailure/ClassDependsOnSuperMod2.java new file mode 100644 index 0000000..3ee27c7 --- /dev/null +++ b/test/resources/design/src/mod/warfailure/ClassDependsOnSuperMod2.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.warfailure; + +import mod.dummy.DummyClass; + +/** + * This class depends on a superclass in another package creating a dependency + * between packages. + * @author dhiller + */ +public class ClassDependsOnSuperMod2 extends DummyClass { + +} diff --git a/test/resources/design/src/mod/warsuccess/ClassDependsOnSuperMod2.java b/test/resources/design/src/mod/warsuccess/ClassDependsOnSuperMod2.java new file mode 100644 index 0000000..da5e8a2 --- /dev/null +++ b/test/resources/design/src/mod/warsuccess/ClassDependsOnSuperMod2.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Created on Dec 29, 2004 + */ +package mod.warsuccess; + +import mod.dummy.DummyClass; + +/** + * This class depends on a superclass in another package creating a dependency + * between packages. + * @author dhiller + */ +public class ClassDependsOnSuperMod2 extends DummyClass { + +} diff --git a/test/resources/design/verifydesign.xml b/test/resources/design/verifydesign.xml new file mode 100644 index 0000000..53d7d17 --- /dev/null +++ b/test/resources/design/verifydesign.xml @@ -0,0 +1,440 @@ +<project name="test_verifydesign" basedir="." default="cleanup"> + <property name="output" value="build"/> + <property name="classes" value="${output}/classes"/> + <property name="jardir" value="${output}/jar"/> + <property name="jar" value="${jardir}/test.jar"/> + <property name="war" value="${jardir}/test.war"/> + <property name="src" value="src"/> + <property name="mod" value="mod"/> + <property name="dummy" value="dummy"/> + <property name="designs" value="designfiles"/> + <property name="webxml" value="web.xml"/> + + <taskdef resource="net/sf/antcontrib/antcontrib.properties"> + <classpath location="${antcontrib.jar}"/> + </taskdef> + + <target name="cleanup"> + <delete quiet="yes" dir="${output}"/> + </target> + + <target name="init"> + <mkdir dir="${jardir}"/> + </target> + + <target name="templateTest"> + <delete dir="${classes}"/> + <mkdir dir="${classes}"/> + <javac srcdir="${src}" debug="true" destdir="${classes}"> + <include name="${mod}/${dummy}/**"/> + <include name="${mod}/${package.under.test}/**"/> + </javac> + <jar destfile="${jar}" basedir="${classes}"/> + </target> + + <target name="templateWar"> + <delete dir="${classes}"/> + <mkdir dir="${classes}"/> + <javac srcdir="${src}" debug="true" destdir="${classes}"> + <include name="${mod}/${dummy}/**"/> + <include name="${mod}/${package.under.test}/**"/> + </javac> + + <war destfile="${war}" webxml="${webxml}"> + <classes dir="${classes}"/> + </war> + </target> + + <target name="testArrayDepend" depends="init"> + <property name="package" value="arraydepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testArrayDepend2" depends="init"> + <property name="package" value="arraydepend2"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testArrayDepend3" depends="init"> + <property name="package" value="arraydepend3"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testBadXML" depends="init"> + <property name="package" value="badxml"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testCastDepend" depends="init"> + <property name="package" value="castdepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testCatchDepend" depends="init"> + <property name="package" value="catchdepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testClassFiles" depends="init"> + <property name="package" value="castdepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign design="${designs}/${package}.xml"> + <path> + <fileset dir="${classes}"> + <include name="**/*.class"/> + </fileset> + </path> + </verifydesign> + </target> + + <target name="testDeclareJavaUtil" depends="init"> + <property name="package" value="declarejavautil"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testDeclareJavaUtilFail" depends="init"> + <property name="package" value="declarejavautil"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}fail.xml"/> + </target> + + <target name="testDeclareJavax" depends="init"> + <property name="package" value="declarejavax"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testDeclareJavaxPass" depends="init"> + <property name="package" value="declarejavax"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}pass.xml"/> + </target> + + <target name="testFieldDepend" depends="init"> + <property name="package" value="fielddepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testFieldRefDepend" depends="init"> + <property name="package" value="fieldrefdepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testInnerClassDepend" depends="init"> + <property name="package" value="innerclassdepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testInstanceOfDepend" depends="init"> + <property name="package" value="instanceofdepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testInterfaceDepend" depends="init"> + <property name="package" value="interfacedepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testLocalVarDepend" depends="init"> + <property name="package" value="localvardepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testLocalVarRefDepend" depends="init"> + <property name="package" value="localvarrefdepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testMissingAttribute" depends="init"> + <property name="package" value="missingattribute"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testMultipleErrors" depends="init"> + <property name="package" value="multipleerrors"/> + + <delete dir="${classes}"/> + <mkdir dir="${classes}"/> + <javac srcdir="${src}" debug="true" destdir="${classes}"> + <include name="${mod}/${dummy}/**"/> + <include name="${mod}/arraydepend/**"/> + <include name="${mod}/castdepend/**"/> + <include name="${mod}/catchdepend/**"/> + </javac> + <jar destfile="${jar}" basedir="${classes}"/> + + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testNewDepend" depends="init"> + <property name="package" value="newdepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testNewDepend2" depends="init"> + <property name="package" value="newdepend2"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testNoDebugOption" depends="init"> + <property name="package" value="nodebugoption"/> + + <delete dir="${classes}"/> + <mkdir dir="${classes}"/> + <javac srcdir="${src}" debug="true" destdir="${classes}"> + <include name="${mod}/${dummy}/**"/> + </javac> + <javac srcdir="${src}" debug="false" destdir="${classes}"> + <include name="${mod}/${package}/**"/> + </javac> + + <jar destfile="${jar}" basedir="${classes}"/> + + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testNoJar" depends="init"> + <property name="package" value="nojar"/> + + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testParamDepend" depends="init"> + <property name="package" value="paramdepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testPassLocalDepend" depends="init"> + <property name="package" value="passlocaldepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testPathElementLocation" depends="init"> + <property name="package" value="putstatic"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign design="${designs}/${package}.xml"> + <path> + <pathelement location="${classes}"/> + </path> + </verifydesign> + </target> + + <target name="testPathElementPath" depends="init"> + <property name="package" value="pathelementpath"/> + <property name="classes2" value="${output}/classes2"/> + <property name="classes3" value="${output}/classes3"/> + <mkdir dir="${classes}"/> + <mkdir dir="${classes2}"/> + <mkdir dir="${classes3}"/> + + <javac srcdir="${src}" debug="true" destdir="${classes}"> + <include name="${mod}/${dummy}/**"/> + </javac> + + <javac srcdir="${src}" debug="true" destdir="${classes2}" classpath="${classes}"> + <include name="${mod}/putstatic/**"/> + </javac> + + <javac srcdir="${src}" debug="true" destdir="${classes3}" classpath="${classes}"> + <include name="${mod}/arraydepend2/**"/> + </javac> + + <jar destfile="${jar}" basedir="${classes3}"/> + + <verifydesign design="${designs}/${package}.xml"> + <path> + <pathelement path="${classes2}:${jar}:${classes}"/> + </path> + </verifydesign> + </target> + + <target name="testPutStatic" depends="init"> + <property name="package" value="putstatic"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testRecursion" depends="init"> + <property name="package" value="recursion"/> + + <delete dir="${classes}"/> + <mkdir dir="${classes}"/> + <javac srcdir="${src}" debug="true" destdir="${classes}"> + <include name="${mod}/${package}/**"/> + </javac> + + <jar destfile="${jar}" basedir="${classes}"/> + + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testRecursion2" depends="init"> + <property name="package" value="recursion2"/> + + <delete dir="${classes}"/> + <mkdir dir="${classes}"/> + <javac srcdir="${src}" debug="true" destdir="${classes}"> + <include name="${mod}/${package}/**"/> + </javac> + + <jar destfile="${jar}" basedir="${classes}"/> + + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testRecursion3" depends="init"> + <property name="package" value="recursion3"/> + + <delete dir="${classes}"/> + <mkdir dir="${classes}"/> + <javac srcdir="${src}" debug="true" destdir="${classes}"> + <include name="${mod}/${package}/**"/> + </javac> + + <jar destfile="${jar}" basedir="${classes}"/> + + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testReturnValDepend" depends="init"> + <property name="package" value="returnvaldepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testSignatureExceptionDepend" depends="init"> + <property name="package" value="signatureexceptiondepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testStaticDepend" depends="init"> + <property name="package" value="staticdepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testStaticField2Depend" depends="init"> + <property name="package" value="staticfield2depend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testStaticFieldDepend" depends="init"> + <property name="package" value="staticfielddepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testStaticFinalDepend" depends="init"> + <property name="package" value="staticfinaldepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml"/> + </target> + + <target name="testSuperDepend" depends="init"> + <property name="package" value="superdepend"/> + <antcall target="templateTest"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${jar}" design="${designs}/${package}.xml" + deletefiles="true"/> + </target> + + <target name="testWarSuccess" depends="init"> + <property name="package" value="warsuccess"/> + <antcall target="templateWar"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${war}" design="${designs}/${package}.xml"/> + </target> + + <target name="testWarFailure" depends="init"> + <property name="package" value="warfailure"/> + <antcall target="templateWar"> + <param name="package.under.test" value="${package}"/> + </antcall> + <verifydesign jar="${war}" design="${designs}/${package}.xml"/> + </target> +</project> diff --git a/test/resources/design/web.xml b/test/resources/design/web.xml new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/resources/design/web.xml |