diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:08:37 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:08:37 +0000 |
commit | 4ef0430519e276c2bdecea75f7a0f42f49f0cf30 (patch) | |
tree | 19dd40a9336c52160da6671d2fb3d428725733d4 /sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy | |
parent | 725006d4c47e63986ac042ade23a4d193298b1fe (diff) |
Moving 1.x branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835132 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy')
20 files changed, 762 insertions, 0 deletions
diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/ArraysTestStruct.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/ArraysTestStruct.java new file mode 100644 index 0000000000..7f90520d67 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/ArraysTestStruct.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +import org.apache.tuscany.sca.binding.corba.meta.CorbaArray; + +public final class ArraysTestStruct { + + public ArraysTestStruct() { + + } + + public ArraysTestStruct(String[] field1, int[][] field2, float[][][] field3) { + this.field1 = field1; + this.field2 = field2; + this.field3 = field3; + } + + @CorbaArray( {2}) + public String[] field1; + + @CorbaArray( {2, 4}) + public int[][] field2; + + @CorbaArray( {2, 4, 2}) + public float[][][] field3; + +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/Calc.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/Calc.java new file mode 100644 index 0000000000..7c33b1d449 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/Calc.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +import org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero; + +public interface Calc { + + public double div(double arg1, double arg2) throws DivByZero; + + public double divForSmallArgs(double arg1, double arg2); + +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/DummyObject.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/DummyObject.java new file mode 100644 index 0000000000..d0ebff5fec --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/DummyObject.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +public interface DummyObject { + + int getLong(); + + DummyObject cloneObject(); + +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InnerUnion.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InnerUnion.java new file mode 100644 index 0000000000..baf5043bc2 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InnerUnion.java @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElement; +import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElementType; + +public final class InnerUnion { + + @CorbaUnionElement(type = CorbaUnionElementType.option, optionNumber = 1) + private int x; + + @CorbaUnionElement(type = CorbaUnionElementType.option, optionNumber = 2) + private float y; + + @CorbaUnionElement(type = CorbaUnionElementType.discriminator) + @SuppressWarnings("unused") + private int discriminator; + + public int getX() { + return x; + } + + public void setX(int x) { + discriminator = 1; + this.x = x; + } + + public float getY() { + return y; + } + + public void setY(float y) { + discriminator = 2; + this.y = y; + } + +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidCorbaArray.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidCorbaArray.java new file mode 100644 index 0000000000..9ad637fc55 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidCorbaArray.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +import org.apache.tuscany.sca.binding.corba.meta.CorbaArray; + +public final class InvalidCorbaArray { + + // annotation argument array is not equal to declared arrays dimension + @CorbaArray( {1}) + public String[][] array; + + public InvalidCorbaArray() { + + } + + public InvalidCorbaArray(String[][] arg) { + + } + +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum1.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum1.java new file mode 100644 index 0000000000..0c9de5bb31 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum1.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +public class InvalidEnum1 { + + public static final InvalidEnum1 red = new InvalidEnum1(0); + + public int value() { + return 0; + } + + public static InvalidEnum1 from_int(int value) { + return null; + } + + protected InvalidEnum1(int value) { + } +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum2.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum2.java new file mode 100644 index 0000000000..8746eb7f9b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum2.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +public class InvalidEnum2 { + + public static final int _red = 0; + public static final InvalidEnum2 red = new InvalidEnum2(_red); + + public static InvalidEnum2 from_int(int value) { + return null; + } + + protected InvalidEnum2(int value) { + } +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum3.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum3.java new file mode 100644 index 0000000000..6d124b0485 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum3.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +public class InvalidEnum3 { + + public static final int _red = 0; + public static final InvalidEnum2 red = new InvalidEnum2(_red); + + public int value() { + return 0; + } + + protected InvalidEnum3(int value) { + } +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct1.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct1.java new file mode 100644 index 0000000000..8cf66e2fac --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct1.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +public final class InvalidStruct1 { + + public InvalidStruct1() { + + } + +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct2.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct2.java new file mode 100644 index 0000000000..5f361512f0 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct2.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +public final class InvalidStruct2 { + + public int f1; + public String f2; + + public InvalidStruct2(int f1, String f2) { + + } + +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct3.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct3.java new file mode 100644 index 0000000000..adc81ea5a2 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct3.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +public final class InvalidStruct3 { + + public int f1; + public String f2; + public static byte f3; + + public InvalidStruct3() { + + } + + public InvalidStruct3(int f1, String f2, byte f3) { + + } + +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidUnion1.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidUnion1.java new file mode 100644 index 0000000000..c3fd45d5f4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidUnion1.java @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElement; +import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElementType; + +/** + * More than one discriminators + */ +public final class InvalidUnion1 { + + @CorbaUnionElement(type = CorbaUnionElementType.discriminator) + @SuppressWarnings("unused") + private int a; + @CorbaUnionElement(type = CorbaUnionElementType.discriminator) + @SuppressWarnings("unused") + private int b; + +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidUnion2.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidUnion2.java new file mode 100644 index 0000000000..f6d5421a56 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidUnion2.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElement; +import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElementType; + +/** + * Discriminator is missing + */ +public final class InvalidUnion2 { + + @CorbaUnionElement(type=CorbaUnionElementType.defaultOption) + @SuppressWarnings("unused") + private int a; + +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidUnion3.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidUnion3.java new file mode 100644 index 0000000000..0d1bdd0a13 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidUnion3.java @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElement; +import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElementType; + +/** + * No option, only discriminator + */ +public final class InvalidUnion3{ + + @CorbaUnionElement(type = CorbaUnionElementType.discriminator) + @SuppressWarnings("unused") + private int a; + +} + diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidUnion4.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidUnion4.java new file mode 100644 index 0000000000..3afe702f87 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidUnion4.java @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElement; +import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElementType; + +/** + * Invalid field modifiers + */ +public final class InvalidUnion4{ + + @CorbaUnionElement(type = CorbaUnionElementType.discriminator) + @SuppressWarnings("unused") + private static int a; + + @CorbaUnionElement(type = CorbaUnionElementType.defaultOption) + @SuppressWarnings("unused") + private static int b; + +} + diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidUnion5.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidUnion5.java new file mode 100644 index 0000000000..9d30e5ced1 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidUnion5.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElement; +import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElementType; + +/** + * Reused option id + */ +public final class InvalidUnion5 { + + @CorbaUnionElement(type = CorbaUnionElementType.discriminator) + @SuppressWarnings("unused") + private int a; + + @CorbaUnionElement(type = CorbaUnionElementType.option, optionNumber = 1) + @SuppressWarnings("unused") + private int b; + + @CorbaUnionElement(type = CorbaUnionElementType.option, optionNumber = 1) + @SuppressWarnings("unused") + private int c; + +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/NonCorbaException.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/NonCorbaException.java new file mode 100644 index 0000000000..a514b5e222 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/NonCorbaException.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +public class NonCorbaException extends Exception { + + private static final long serialVersionUID = 1L; + + public String someField; + +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/RichUnion.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/RichUnion.java new file mode 100644 index 0000000000..2ea40e345f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/RichUnion.java @@ -0,0 +1,91 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElement; +import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElementType; + +public final class RichUnion { + + @CorbaUnionElement(type = CorbaUnionElementType.option, optionNumber = 1) + private int x; + + @CorbaUnionElement(type = CorbaUnionElementType.option, optionNumber = 2) + private float y; + + @CorbaUnionElement(type = CorbaUnionElementType.option, optionNumber = 3) + private String z; + + @CorbaUnionElement(type = CorbaUnionElementType.option, optionNumber = 4) + private InnerUnion iu; + + @CorbaUnionElement(type = CorbaUnionElementType.defaultOption) + private boolean def; + + @CorbaUnionElement(type = CorbaUnionElementType.discriminator) + @SuppressWarnings("unused") + private int discriminator = -1; + + public int getX() { + return x; + } + + public void setX(int x) { + this.discriminator = 1; + this.x = x; + } + + public float getY() { + return y; + } + + public void setY(float y) { + this.discriminator = 2; + this.y = y; + } + + public String getZ() { + return z; + } + + public void setZ(String z) { + this.discriminator = 3; + this.z = z; + } + + public boolean isDef() { + return def; + } + + public void setDef(boolean def) { + this.discriminator = -1; + this.def = def; + } + + public InnerUnion getIu() { + return iu; + } + + public void setIu(InnerUnion iu) { + this.discriminator = 4; + this.iu = iu; + } + +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SimpleStruct.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SimpleStruct.java new file mode 100644 index 0000000000..85ca3798f4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SimpleStruct.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +/** + * @version $Rev$ $Date$ + */ +public class SimpleStruct { + + public String field1; + public int field2; + +} diff --git a/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SomeStruct.java b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SomeStruct.java new file mode 100644 index 0000000000..d8cdf1835a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SomeStruct.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +package org.apache.tuscany.sca.binding.corba.testing.hierarchy; + +/** + * @version $Rev$ $Date$ + */ +public class SomeStruct { + + public SimpleStruct innerStruct; + public String str; + public String[] str_list; + public int[][] twoDimSeq; + public int[][][] threeDimSeq; + +} |