TAP5-2560: fixing build errors
authorThiago H. de Paula Figueiredo <thiago@arsmachina.com.br>
Thu, 17 Jan 2019 02:43:06 +0000 (00:43 -0200)
committerThiago H. de Paula Figueiredo <thiago@arsmachina.com.br>
Thu, 17 Jan 2019 02:43:06 +0000 (00:43 -0200)
23 files changed:
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/AbstractBeanModelSourceImplTest.java
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/BeanWithStaticField.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/Bedrock.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/ComplexObject.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/CompositeBean.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/DataBean.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/EchoBean.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/EnumBean.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/GenericBean.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/GuavaBeanModelSourceImplTest.java
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/NestedObject.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/NonVisualBean.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/PropertyOrderBean.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/ReadOnlyBean.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/SimpleBean.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/SimpleBeanSubclass.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/StoogeBean.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/StringArrayBean.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/StringHolder.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/StringHolderBean.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/StringSource.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/VisibilityBean.java [new file with mode: 0644]
genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/WriteOnlyBean.java [new file with mode: 0644]

index 96ea169..61608b2 100644 (file)
@@ -13,44 +13,38 @@ package org.apache.tapestry5.internal.genericsresolverguava;
 //See the License for the specific language governing permissions and
 //limitations under the License.
 
+import java.util.Arrays;
+import java.util.Collections;
+
 import org.apache.tapestry5.PropertyConduit;
 import org.apache.tapestry5.beaneditor.BeanModel;
-import org.apache.tapestry5.beaneditor.BeanModelSourceBuilder;
 import org.apache.tapestry5.beaneditor.PropertyModel;
 import org.apache.tapestry5.beaneditor.RelativePosition;
 import org.apache.tapestry5.beaneditor.Sortable;
-import org.apache.tapestry5.internal.PropertyOrderBean;
-import org.apache.tapestry5.internal.services.BeanWithStaticField;
-import org.apache.tapestry5.internal.services.CompositeBean;
-import org.apache.tapestry5.internal.services.EnumBean;
-import org.apache.tapestry5.internal.services.NonVisualBean;
-import org.apache.tapestry5.internal.services.PropertyExpressionException;
-import org.apache.tapestry5.internal.services.SimpleBean;
-import org.apache.tapestry5.internal.services.StoogeBean;
-import org.apache.tapestry5.internal.services.StringArrayBean;
-import org.apache.tapestry5.internal.services.WriteOnlyBean;
-import org.apache.tapestry5.internal.test.InternalBaseTestCase;
-import org.apache.tapestry5.internal.transform.pages.ReadOnlyBean;
+import org.apache.tapestry5.ioc.AnnotationProvider;
 import org.apache.tapestry5.ioc.Messages;
+import org.apache.tapestry5.ioc.Registry;
+import org.apache.tapestry5.ioc.RegistryBuilder;
+import org.apache.tapestry5.ioc.test.IOCTestCase;
 import org.apache.tapestry5.ioc.util.UnknownValueException;
+import org.apache.tapestry5.modules.TapestryModule;
 import org.apache.tapestry5.services.BeanModelSource;
 import org.easymock.EasyMock;
+import org.testng.annotations.AfterSuite;
 import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeSuite;
 import org.testng.annotations.Test;
 
-import java.util.Arrays;
-import java.util.Collections;
-
 /**
  * Copied from tapestry-core's tests due to the lack of a better option.
 * Tests for the bean editor model source itself, as well as the model classes.
 */
-public abstract class AbstractBeanModelSourceImplTest extends InternalBaseTestCase
+public abstract class AbstractBeanModelSourceImplTest extends IOCTestCase
 {
  private BeanModelSource source;
 
  protected abstract BeanModelSource create();
-
  @BeforeClass
  public void setup()
  {
@@ -78,7 +72,7 @@ public abstract class AbstractBeanModelSourceImplTest extends InternalBaseTestCa
      assertEquals(model.getPropertyNames(), Arrays.asList("firstName", "lastName", "age"));
 
      assertEquals(model.toString(),
-             "BeanModel[org.apache.tapestry5.internal.services.SimpleBean properties:firstName, lastName, age]");
+             "BeanModel[org.apache.tapestry5.internal.genericsresolverguava.SimpleBean properties:firstName, lastName, age]");
 
      PropertyModel age = model.get("age");
 
@@ -310,7 +304,7 @@ public abstract class AbstractBeanModelSourceImplTest extends InternalBaseTestCa
      {
          assertEquals(
                  ex.getMessage(),
-                 "Bean editor model for org.apache.tapestry5.internal.services.SimpleBean already contains a property model for property \'age\'.");
+                 "Bean editor model for org.apache.tapestry5.internal.genericsresolverguava.SimpleBean already contains a property model for property \'age\'.");
      }
 
      verify();
@@ -335,7 +329,7 @@ public abstract class AbstractBeanModelSourceImplTest extends InternalBaseTestCa
      {
          assertEquals(
                  ex.getMessage(),
-                 "Bean editor model for org.apache.tapestry5.internal.services.SimpleBean does not contain a property named \'frobozz\'.");
+                 "Bean editor model for org.apache.tapestry5.internal.genericsresolverguava.SimpleBean does not contain a property named \'frobozz\'.");
 
          assertListsEquals(ex.getAvailableValues().getValues(), "age", "firstName", "lastName");
      }
@@ -364,7 +358,7 @@ public abstract class AbstractBeanModelSourceImplTest extends InternalBaseTestCa
      {
          assertEquals(
                  ex.getMessage(),
-                 "Bean editor model for org.apache.tapestry5.internal.services.SimpleBean does not contain a property with id \'frobozz\'.");
+                 "Bean editor model for org.apache.tapestry5.internal.genericsresolverguava.SimpleBean does not contain a property with id \'frobozz\'.");
 
          assertListsEquals(ex.getAvailableValues().getValues(), "age", "firstName", "lastName", "shrubfoo");
      }
@@ -586,7 +580,7 @@ public abstract class AbstractBeanModelSourceImplTest extends InternalBaseTestCa
      {
          model.add("doesNotExist");
          unreachable();
-     } catch (PropertyExpressionException ex)
+     } catch (Exception ex)
      {
          assertMessageContains(ex, "does not contain", "doesNotExist");
      }
@@ -868,5 +862,10 @@ public abstract class AbstractBeanModelSourceImplTest extends InternalBaseTestCa
             return value_;
         }
     }
+
+    protected final PropertyConduit mockPropertyConduit()
+    {
+        return newMock(PropertyConduit.class);
+    }
+
 }
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/BeanWithStaticField.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/BeanWithStaticField.java
new file mode 100644 (file)
index 0000000..74da20d
--- /dev/null
@@ -0,0 +1,8 @@
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+public class BeanWithStaticField
+{
+    public static final String DEFAULT_NAME = "Joe";
+
+    public String name = DEFAULT_NAME;
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/Bedrock.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/Bedrock.java
new file mode 100644 (file)
index 0000000..6cceb86
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2009 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+public class Bedrock
+{
+    public String toName(boolean fred)
+    {
+        return fred ? "Fred" : "Barney";
+    }
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/ComplexObject.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/ComplexObject.java
new file mode 100644 (file)
index 0000000..6b2f040
--- /dev/null
@@ -0,0 +1,43 @@
+// Copyright 2009 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+public class ComplexObject
+{
+    private int nestedIndex;
+
+    public NestedObject get(int index)
+    {
+        switch (index)
+        {
+            case 0:
+                return new NestedObject("zero");
+
+            default:
+                return new NestedObject("one");
+        }
+    }
+
+    public int getNestedIndex()
+    {
+        return nestedIndex;
+    }
+
+    public void setNestedIndex(int nestedIndex)
+    {
+        this.nestedIndex = nestedIndex;
+    }
+
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/CompositeBean.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/CompositeBean.java
new file mode 100644 (file)
index 0000000..3afd27d
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright 2007 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+public class CompositeBean
+{
+    private SimpleBean simple = new SimpleBean();
+
+    public SimpleBean getSimple()
+    {
+        return simple;
+    }
+
+    public void setSimple(SimpleBean simple)
+    {
+        this.simple = simple;
+    }
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/DataBean.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/DataBean.java
new file mode 100644 (file)
index 0000000..ea582fa
--- /dev/null
@@ -0,0 +1,57 @@
+// Copyright 2007, 2010 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+/**
+ * Used as test when setting the order of properties in a {@link org.apache.tapestry5.beaneditor.BeanModel}.
+ */
+public class DataBean
+{
+    private String firstName;
+
+    private String lastName;
+
+    private int age;
+
+    public String getFirstName()
+    {
+        return firstName;
+    }
+
+    public String getLastName()
+    {
+        return lastName;
+    }
+
+    public int getAge()
+    {
+        return age;
+    }
+
+    public void setAge(int age)
+    {
+        this.age = age;
+    }
+
+    public void setFirstName(String firstName)
+    {
+        this.firstName = firstName;
+    }
+
+    public void setLastName(String lastName)
+    {
+        this.lastName = lastName;
+    }
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/EchoBean.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/EchoBean.java
new file mode 100644 (file)
index 0000000..588e930
--- /dev/null
@@ -0,0 +1,112 @@
+// Copyright 2008, 2011 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+import java.util.List;
+import java.util.Map;
+
+public class EchoBean
+{
+    public int storedInt;
+
+    private double storedDouble;
+
+    private String storedString;
+
+    private StringSource stringSource;
+    
+    private Number[][] storedArray;
+
+    public StringSource getStringSource()
+    {
+        return stringSource;
+    }
+
+    public void setStringSource(StringSource stringSource)
+    {
+        this.stringSource = stringSource;
+    }
+
+    public int echoInt(int value, int multiplyBy)
+    {
+        return value * multiplyBy;
+    }
+
+    public double echoDouble(double value, double multiplyBy)
+    {
+        return value * multiplyBy;
+    }
+
+    public int getStoredInt()
+    {
+        return storedInt;
+    }
+
+    public void setStoredInt(int storedInt)
+    {
+        this.storedInt = storedInt;
+    }
+
+    public double getStoredDouble()
+    {
+        return storedDouble;
+    }
+
+    public void setStoredDouble(double storedDouble)
+    {
+        this.storedDouble = storedDouble;
+    }
+
+    public String getStoredString()
+    {
+        return storedString;
+    }
+
+    public void setStoredString(String storedString)
+    {
+        this.storedString = storedString;
+    }
+    
+
+    public Number[][] getStoredArray()
+    {
+        return storedArray;
+    }
+
+    public void setStoredArray(Number[][] storedArray)
+    {
+        this.storedArray = storedArray;
+    }
+
+    public String echoString(String value, String before, String after)
+    {
+        return String.format("%s - %s - %s", before, value, after);
+    }
+
+    public List echoList(List input)
+    {
+        return input;
+    }
+    
+    public Number[][] echoArray(Number[][] input)
+    {
+        return input;
+    }
+
+    public Map echoMap(Map input)
+    {
+        return input;
+    }
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/EnumBean.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/EnumBean.java
new file mode 100644 (file)
index 0000000..277ba40
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright 2007 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+import org.apache.tapestry5.internal.parser.TokenType;
+
+public class EnumBean
+{
+    private TokenType token;
+
+    public TokenType getToken()
+    {
+        return token;
+    }
+
+    public void setToken(TokenType token)
+    {
+        this.token = token;
+    }
+
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/GenericBean.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/GenericBean.java
new file mode 100644 (file)
index 0000000..2c3f388
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright 2008 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+public class GenericBean<T>
+{
+    private T value;
+
+    public T getValue()
+    {
+        return value;
+    }
+
+    public void setValue(T value)
+    {
+        this.value = value;
+    }
+}
index dd75b37..7645629 100644 (file)
@@ -11,6 +11,7 @@
 // limitations under the License.
 package org.apache.tapestry5.internal.genericsresolverguava;
 
+import org.apache.tapestry5.beaneditor.BeanModelSourceBuilder;
 import org.apache.tapestry5.services.BeanModelSource;
 
 public class GuavaBeanModelSourceImplTest extends AbstractBeanModelSourceImplTest {
@@ -18,7 +19,7 @@ public class GuavaBeanModelSourceImplTest extends AbstractBeanModelSourceImplTes
     @Override
     protected BeanModelSource create()
     {
-        return getObject(BeanModelSource.class, null);
+        return new BeanModelSourceBuilder().build();
     }
     
 }
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/NestedObject.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/NestedObject.java
new file mode 100644 (file)
index 0000000..ab549a9
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright 2009 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+public class NestedObject
+{
+    private final String name;
+
+    public NestedObject(String name)
+    {
+        this.name = name;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/NonVisualBean.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/NonVisualBean.java
new file mode 100644 (file)
index 0000000..c596c13
--- /dev/null
@@ -0,0 +1,45 @@
+// Copyright 2007 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+import org.apache.tapestry5.beaneditor.NonVisual;
+
+public class NonVisualBean
+{
+    private int id;
+
+    private String name;
+
+    @NonVisual
+    public int getId()
+    {
+        return id;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setId(int id)
+    {
+        this.id = id;
+    }
+
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/PropertyOrderBean.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/PropertyOrderBean.java
new file mode 100644 (file)
index 0000000..7b7714e
--- /dev/null
@@ -0,0 +1,57 @@
+// Copyright 2007, 2008 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+import org.apache.tapestry5.beaneditor.ReorderProperties;
+
+@ReorderProperties("third")
+public class PropertyOrderBean
+{
+    private String first;
+
+    private String second;
+
+    private String third;
+
+    public String getFirst()
+    {
+        return first;
+    }
+
+    public String getSecond()
+    {
+        return second;
+    }
+
+    public String getThird()
+    {
+        return third;
+    }
+
+    public void setFirst(String first)
+    {
+        this.first = first;
+    }
+
+    public void setSecond(String second)
+    {
+        this.second = second;
+    }
+
+    public void setThird(String third)
+    {
+        this.third = third;
+    }
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/ReadOnlyBean.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/ReadOnlyBean.java
new file mode 100644 (file)
index 0000000..dfeccfd
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright 2006, 2007, 2008 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+public class ReadOnlyBean
+{
+    private String _value;
+
+    public String getValue()
+    {
+        return _value;
+    }
+
+    public void setValue(String value)
+    {
+        _value = value;
+    }
+
+    public String getReadOnly()
+    {
+        return null;
+    }
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/SimpleBean.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/SimpleBean.java
new file mode 100644 (file)
index 0000000..9d9da66
--- /dev/null
@@ -0,0 +1,60 @@
+// Copyright 2007, 2008 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+import org.apache.tapestry5.beaneditor.Validate;
+import org.apache.tapestry5.beaneditor.Width;
+
+public class SimpleBean
+{
+    @Validate("required")
+    private String firstName;
+
+    private String lastName;
+
+    private int age;
+
+    public String getFirstName()
+    {
+        return firstName;
+    }
+
+    public String getLastName()
+    {
+        return lastName;
+    }
+
+    @Width(2)
+    public int getAge()
+    {
+        return age;
+    }
+
+    public void setAge(int age)
+    {
+        this.age = age;
+    }
+
+    public void setFirstName(String firstName)
+    {
+        this.firstName = firstName;
+    }
+
+    public void setLastName(String lastName)
+    {
+        this.lastName = lastName;
+    }
+
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/SimpleBeanSubclass.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/SimpleBeanSubclass.java
new file mode 100644 (file)
index 0000000..d7474a1
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2008 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+public class SimpleBeanSubclass extends SimpleBean
+{
+    public void notOverridden()
+    {
+    }
+
+    @Override
+    public void setAge(int age)
+    {
+        super.setAge(age);
+    }
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/StoogeBean.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/StoogeBean.java
new file mode 100644 (file)
index 0000000..f5b3706
--- /dev/null
@@ -0,0 +1,64 @@
+// Copyright 2007, 2008 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+import org.apache.tapestry5.beaneditor.ReorderProperties;
+
+@ReorderProperties("larry,moe,shemp,curly")
+public class StoogeBean
+{
+    private int moe, larry, curly, shemp;
+
+    public int getMoe()
+    {
+        return moe;
+    }
+
+    public int getCurly()
+    {
+        return curly;
+    }
+
+    public int getLarry()
+    {
+        return larry;
+    }
+
+    public int getShemp()
+    {
+        return shemp;
+    }
+
+    public void setCurly(int curly)
+    {
+        this.curly = curly;
+    }
+
+    public void setLarry(int larry)
+    {
+        this.larry = larry;
+    }
+
+    public void setMoe(int moe)
+    {
+        this.moe = moe;
+    }
+
+    public void setShemp(int shemp)
+    {
+        this.shemp = shemp;
+    }
+
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/StringArrayBean.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/StringArrayBean.java
new file mode 100644 (file)
index 0000000..52eceb7
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright 2007 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+public class StringArrayBean
+{
+    private String[] array;
+
+    public String[] getArray()
+    {
+        return array;
+    }
+
+    public void setArray(String[] array)
+    {
+        this.array = array;
+    }
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/StringHolder.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/StringHolder.java
new file mode 100644 (file)
index 0000000..9bcb7f0
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2008 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+import org.apache.tapestry5.internal.util.Holder;
+
+public class StringHolder extends Holder<String>
+{
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/StringHolderBean.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/StringHolderBean.java
new file mode 100644 (file)
index 0000000..627d217
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2008 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+public class StringHolderBean extends GenericBean<StringHolder>
+{
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/StringSource.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/StringSource.java
new file mode 100644 (file)
index 0000000..5903bf5
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright 2008 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+public class StringSource
+{
+    private final String value;
+
+    public StringSource(String value)
+    {
+        this.value = value;
+    }
+
+    public String getValue()
+    {
+        return value;
+    }
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/VisibilityBean.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/VisibilityBean.java
new file mode 100644 (file)
index 0000000..c0f703b
--- /dev/null
@@ -0,0 +1,51 @@
+// Copyright 2006 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+import org.apache.tapestry5.annotations.Retain;
+
+/**
+ * Used to test some issues related to visibility.
+ */
+public class VisibilityBean
+{
+    // Got to some real effort to provoke some name collisions!
+
+    @Retain
+    public static int _$myStatic;
+
+    @Retain
+    protected String _$myProtected;
+
+    @Retain
+    String _$myPackagePrivate;
+
+    @Retain
+    public String _$myPublic;
+
+    @Retain
+    private long $myLong;
+
+    public long getMyLong()
+    {
+        return $myLong;
+    }
+
+    public void setMyLong(long myLong)
+    {
+        $myLong = myLong;
+    }
+
+}
diff --git a/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/WriteOnlyBean.java b/genericsresolver-guava/src/test/java/org/apache/tapestry5/internal/genericsresolverguava/WriteOnlyBean.java
new file mode 100644 (file)
index 0000000..96de77c
--- /dev/null
@@ -0,0 +1,36 @@
+// Copyright 2007 The Apache Software Foundation
+//
+// 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.
+
+package org.apache.tapestry5.internal.genericsresolverguava;
+
+public class WriteOnlyBean
+{
+    public String getReadOnly()
+    {
+        return null;
+    }
+
+    public String getReadWrite()
+    {
+        return null;
+    }
+
+    public void setReadWrite(String value)
+    {
+    }
+
+    public void setWriteOnly(String value)
+    {
+    }
+}