You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mc...@apache.org on 2011/10/22 03:05:32 UTC
svn commit: r1187613 [2/3] - in /commons/proper/ognl: ./ 3.0.1_CHM/
3.0.3_HM/ 3.0.3_RRWL/ src/ src/main/ src/main/java/ src/main/java/org/
src/main/java/org/apache/ src/main/java/org/apache/commons/
src/main/java/org/apache/commons/ognl/ src/main/java/...
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BaseIndexed.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BaseObjectIndexed.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BaseObjectIndexed.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BaseObjectIndexed.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BaseObjectIndexed.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,65 @@
+/*
+ * $Id: BaseObjectIndexed.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+import java.util.*;
+
+public class BaseObjectIndexed
+ extends Object
+{
+ private Map attributes = new HashMap();
+
+ public BaseObjectIndexed()
+ {
+ super();
+ }
+
+ public Map getAttributes()
+ {
+ return attributes;
+ }
+
+ public Object getAttribute( String name )
+ {
+ return attributes.get( name );
+ }
+
+ public void setAttribute( String name, Object value )
+ {
+ attributes.put( name, value );
+ }
+
+ /* allow testing property name where types do not match */
+ public Object getOtherAttribute( String name )
+ {
+ return null;
+ }
+
+ public void setOtherAttribute( Object someObject, Object foo )
+ {
+ /* do nothing */
+ }
+
+ /* test whether get only is found */
+ public Object getSecondaryAttribute( Object name )
+ {
+ return attributes.get( name );
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BaseObjectIndexed.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BaseSyntheticObject.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BaseSyntheticObject.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BaseSyntheticObject.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BaseSyntheticObject.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,35 @@
+/*
+ * $Id: BaseSyntheticObject.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Used to test OGNL-136 use of synthetic methods.
+ */
+public abstract class BaseSyntheticObject
+{
+
+ protected List getList()
+ {
+ return new ArrayList();
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BaseSyntheticObject.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Bean1.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Bean1.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Bean1.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Bean1.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,30 @@
+/*
+ * $Id: Bean1.java 1182768 2011-10-13 10:29:34Z mcucchiara $
+ * 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.commons.ognl.performance.objects;
+
+public class Bean1
+{
+ private Bean2 bean2 = new Bean2();
+
+ public Bean2 getBean2()
+ {
+ return bean2;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Bean1.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Bean2.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Bean2.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Bean2.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Bean2.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,83 @@
+/*
+ * $Id: Bean2.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+public class Bean2
+ extends Object
+{
+ private Bean3 bean3 = new Bean3();
+
+ private boolean _pageBreakAfter = false;
+
+ public Long getId()
+ {
+ return 1l;
+ }
+
+ public Bean3 getBean3()
+ {
+ return bean3;
+ }
+
+ public long getMillis()
+ {
+ return 1000 * 60 * 2;
+ }
+
+ public boolean isCarrier()
+ {
+ return false;
+ }
+
+ public boolean isPageBreakAfter()
+ {
+ return _pageBreakAfter;
+ }
+
+ public void setPageBreakAfter( boolean value )
+ {
+ _pageBreakAfter = value;
+ }
+
+ public void togglePageBreakAfter()
+ {
+ _pageBreakAfter ^= true;
+ }
+
+ public boolean equals( Object o )
+ {
+ if ( this == o )
+ return true;
+ if ( o == null || getClass() != o.getClass() )
+ return false;
+
+ Bean2 bean2 = (Bean2) o;
+
+ if ( _pageBreakAfter != bean2._pageBreakAfter )
+ return false;
+
+ return true;
+ }
+
+ public int hashCode()
+ {
+ return ( _pageBreakAfter ? 1 : 0 );
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Bean2.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Bean3.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Bean3.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Bean3.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Bean3.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,110 @@
+/*
+ * $Id: Bean3.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class Bean3
+ extends Object
+{
+ private int value = 100;
+
+ private Map map;
+ {
+ map = new HashMap();
+ map.put( "foo", "bar" );
+ map.put( "bar", "baz" );
+ }
+
+ private String _nullValue;
+
+ private Object _indexValue;
+
+ public int getValue()
+ {
+ return value;
+ }
+
+ public void setValue( int value )
+ {
+ this.value = value;
+ }
+
+ public Object getIndexedValue( int index )
+ {
+ return _indexValue;
+ }
+
+ public void setIndexedValue( int index, Object value )
+ {
+ _indexValue = value;
+ }
+
+ public Map getMap()
+ {
+ return map;
+ }
+
+ public void setNullValue( String value )
+ {
+ _nullValue = value;
+ }
+
+ public String getNullValue()
+ {
+ return _nullValue;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ( ( _indexValue == null ) ? 0 : _indexValue.hashCode() );
+ return result;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals( Object obj )
+ {
+ if ( this == obj )
+ return true;
+ if ( obj == null )
+ return false;
+ if ( getClass() != obj.getClass() )
+ return false;
+ final Bean3 other = (Bean3) obj;
+ if ( _indexValue == null )
+ {
+ if ( other._indexValue != null )
+ return false;
+ }
+ else if ( !_indexValue.equals( other._indexValue ) )
+ return false;
+ return true;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Bean3.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BeanProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BeanProvider.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BeanProvider.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BeanProvider.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,46 @@
+/*
+ * $Id: BeanProvider.java 1184793 2011-10-16 11:03:46Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ * Test interface to be used with a custom propery accessor.
+ */
+public interface BeanProvider
+{
+
+ /**
+ * Gets a bean by name.
+ *
+ * @param name
+ * @return the related bean by name
+ */
+ Object getBean( String name );
+
+ /**
+ * Sets a new bean mapping.
+ *
+ * @param name
+ * @param bean
+ */
+ void setBean( String name, Object bean );
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BeanProvider.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BeanProviderAccessor.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BeanProviderAccessor.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BeanProviderAccessor.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BeanProviderAccessor.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,93 @@
+/*
+ * $Id: BeanProviderAccessor.java 1125931 2011-05-22 11:54:53Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+import org.apache.commons.ognl.ObjectPropertyAccessor;
+import org.apache.commons.ognl.OgnlContext;
+import org.apache.commons.ognl.OgnlException;
+import org.apache.commons.ognl.OgnlRuntime;
+import org.apache.commons.ognl.PropertyAccessor;
+import org.apache.commons.ognl.enhance.ExpressionCompiler;
+import org.apache.commons.ognl.enhance.UnsupportedCompilationException;
+
+import java.util.Map;
+
+/**
+ * Implementation of provider that works with {@link BeanProvider} instances.
+ */
+public class BeanProviderAccessor
+ extends ObjectPropertyAccessor
+ implements PropertyAccessor
+{
+ @Override
+ public Object getProperty( Map<String, Object> context, Object target, Object name )
+ throws OgnlException
+ {
+ BeanProvider provider = (BeanProvider) target;
+ String beanName = (String) name;
+
+ return provider.getBean( beanName );
+ }
+
+ /**
+ * Returns true if the name matches a bean provided by the provider. Otherwise invokes the super implementation.
+ **/
+
+ @Override
+ public boolean hasGetProperty( Map<String, Object> context, Object target, Object oname )
+ throws OgnlException
+ {
+ BeanProvider provider = (BeanProvider) target;
+ String beanName = ( (String) oname ).replaceAll( "\"", "" );
+
+ return provider.getBean( beanName ) != null;
+ }
+
+ @Override
+ public String getSourceAccessor( OgnlContext context, Object target, Object name )
+ {
+ BeanProvider provider = (BeanProvider) target;
+ String beanName = ( (String) name ).replaceAll( "\"", "" );
+
+ if ( provider.getBean( beanName ) != null )
+ {
+ context.setCurrentAccessor( BeanProvider.class );
+ context.setCurrentType( provider.getBean( beanName ).getClass() );
+
+ ExpressionCompiler.addCastString( context,
+ "(("
+ + OgnlRuntime.getCompiler().getInterfaceClass( provider.getBean( beanName ).getClass() ).getName()
+ + ")" );
+
+ return ".getBean(\"" + beanName + "\"))";
+ }
+
+ return super.getSourceAccessor( context, target, name );
+ }
+
+ @Override
+ public String getSourceSetter( OgnlContext context, Object target, Object name )
+ {
+ throw new UnsupportedCompilationException( "Can't set beans on BeanProvider." );
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BeanProviderAccessor.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BeanProviderImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BeanProviderImpl.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BeanProviderImpl.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BeanProviderImpl.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,50 @@
+/*
+ * $Id: BeanProviderImpl.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Implementation of {@link BeanProvider}.
+ */
+public class BeanProviderImpl
+ implements Serializable, BeanProvider
+{
+ private Map _map = new HashMap();
+
+ public BeanProviderImpl()
+ {
+ }
+
+ public Object getBean( String name )
+ {
+ return _map.get( name );
+ }
+
+ public void setBean( String name, Object bean )
+ {
+ _map.put( name, bean );
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/BeanProviderImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Component.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Component.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Component.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Component.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,78 @@
+/*
+ * $Id: Component.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+public class Component
+ extends Object
+{
+ private URLStorage toDisplay = new URLStorage();
+
+ private Page page = new Page();
+
+ public static class URLStorage
+ extends Object
+ {
+ private String pictureUrl = "http://www.picturespace.com/pictures/100";
+
+ public String getPictureUrl()
+ {
+ return pictureUrl;
+ }
+
+ public void setPictureUrl( String value )
+ {
+ pictureUrl = value;
+ }
+ }
+
+ public static class Page
+ extends Object
+ {
+ public Object createRelativeAsset( String value )
+ {
+ return "/toplevel/" + value;
+ }
+ }
+
+ public Component()
+ {
+ super();
+ }
+
+ public Page getPage()
+ {
+ return page;
+ }
+
+ public void setPage( Page value )
+ {
+ page = value;
+ }
+
+ public URLStorage getToDisplay()
+ {
+ return toDisplay;
+ }
+
+ public void setToDisplay( URLStorage value )
+ {
+ toDisplay = value;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Component.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ComponentImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ComponentImpl.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ComponentImpl.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ComponentImpl.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,52 @@
+/*
+ * $Id: ComponentImpl.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public class ComponentImpl
+ implements IComponent
+{
+
+ String _clientId;
+
+ int _count = 0;
+
+ public String getClientId()
+ {
+ return _clientId;
+ }
+
+ public void setClientId( String id )
+ {
+ _clientId = id;
+ }
+
+ public int getCount( String index )
+ {
+ return _count;
+ }
+
+ public void setCount( String index, int count )
+ {
+ _count = count;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ComponentImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ComponentSubclass.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ComponentSubclass.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ComponentSubclass.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ComponentSubclass.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,40 @@
+/*
+ * $Id: ComponentSubclass.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public class ComponentSubclass
+ extends ComponentImpl
+{
+
+ int _count = 0;
+
+ public int getCount()
+ {
+ return _count;
+ }
+
+ public void setCount( int count )
+ {
+ _count = count;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ComponentSubclass.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Copy.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Copy.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Copy.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Copy.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,32 @@
+/*
+ * $Id: Copy.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public class Copy
+{
+
+ public int size()
+ {
+ return 1;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Copy.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/CorrectedObject.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/CorrectedObject.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/CorrectedObject.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/CorrectedObject.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,45 @@
+/*
+ * $Id: CorrectedObject.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+public class CorrectedObject
+{
+ public CorrectedObject()
+ {
+ }
+
+ public void setStringValue( String value )
+ {
+ }
+
+ public String getStringValue()
+ {
+ return null;
+ }
+
+ public String getIndexedStringValue( String key )
+ {
+ return null;
+ }
+
+ public void setIndexedStringValue( String key, String value )
+ {
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/CorrectedObject.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Cracker.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Cracker.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Cracker.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Cracker.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,33 @@
+/*
+ * $Id: Cracker.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+import java.io.Serializable;
+
+/**
+ * Generic test object.
+ */
+public interface Cracker<T extends Serializable>
+{
+
+ T getParam();
+
+ void setParam( T param );
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Cracker.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Entry.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Entry.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Entry.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Entry.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,55 @@
+/*
+ * $Id: Entry.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public class Entry
+{
+
+ private int _size = 1;
+
+ public int size()
+ {
+ return _size;
+ }
+
+ public Copy getCopy()
+ {
+ return new Copy();
+ }
+
+ public boolean equals( Object o )
+ {
+ if ( this == o )
+ return true;
+ if ( o == null || getClass() != o.getClass() )
+ return false;
+
+ Entry entry = (Entry) o;
+ return _size == entry._size;
+ }
+
+ public int hashCode()
+ {
+ return _size;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Entry.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/EvenOdd.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/EvenOdd.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/EvenOdd.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/EvenOdd.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,56 @@
+/*
+ * $Id: EvenOdd.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public class EvenOdd
+{
+
+ private boolean even = true;
+
+ /**
+ * Returns "even" or "odd". Whatever it returns on one invocation, it will return the opposite on the next. By
+ * default, the first value returned is "even".
+ */
+ public String getNext()
+ {
+ String result = even ? "even" : "odd";
+
+ even = !even;
+
+ return result;
+ }
+
+ public boolean isEven()
+ {
+ return even;
+ }
+
+ /**
+ * Overrides the even flag.
+ */
+
+ public void setEven( boolean value )
+ {
+ even = value;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/EvenOdd.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/FirstBean.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/FirstBean.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/FirstBean.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/FirstBean.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,36 @@
+/*
+ * $Id: FirstBean.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ */
+public class FirstBean
+ extends BaseBean
+{
+
+ public String getName()
+ {
+ return "FirstBean";
+ }
+
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/FirstBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/FormComponentImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/FormComponentImpl.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/FormComponentImpl.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/FormComponentImpl.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,41 @@
+/*
+ * $Id: FormComponentImpl.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public class FormComponentImpl
+ extends ComponentImpl
+ implements IFormComponent
+{
+
+ IForm _form;
+
+ public IForm getForm()
+ {
+ return _form;
+ }
+
+ public void setForm( IForm form )
+ {
+ _form = form;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/FormComponentImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/FormImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/FormImpl.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/FormImpl.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/FormImpl.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,30 @@
+/*
+ * $Id: FormImpl.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public class FormImpl
+ extends ComponentImpl
+ implements IForm
+{
+
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/FormImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GameGeneric.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GameGeneric.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GameGeneric.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GameGeneric.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,33 @@
+/*
+ * $Id: GameGeneric.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public class GameGeneric
+ extends BaseGeneric<GameGenericObject, Long>
+{
+
+ public GameGeneric()
+ {
+ _value = new GameGenericObject();
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GameGeneric.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GameGenericObject.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GameGenericObject.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GameGenericObject.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GameGenericObject.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,48 @@
+/*
+ * $Id: GameGenericObject.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public class GameGenericObject
+ implements GenericObject
+{
+
+ public GameGenericObject()
+ {
+ super();
+ }
+
+ public int getId()
+ {
+ return 20;
+ }
+
+ public String getDisplayName()
+ {
+ return "Halo 3";
+ }
+
+ public String getHappy()
+ {
+ return "happy";
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GameGenericObject.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericCracker.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericCracker.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericCracker.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericCracker.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,40 @@
+/*
+ * $Id: GenericCracker.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public class GenericCracker
+ implements Cracker<Integer>
+{
+
+ Integer _param;
+
+ public Integer getParam()
+ {
+ return _param;
+ }
+
+ public void setParam( Integer param )
+ {
+ _param = param;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericCracker.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericObject.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericObject.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericObject.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericObject.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,31 @@
+/*
+ * $Id: GenericObject.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ * Used by {@link BaseGeneric} to reference a class type.
+ */
+public interface GenericObject
+{
+
+ int getId();
+
+ String getDisplayName();
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericObject.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericRoot.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericRoot.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericRoot.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericRoot.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,51 @@
+/*
+ * $Id: GenericRoot.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public class GenericRoot
+{
+
+ Root _root = new Root();
+
+ GenericCracker _cracker = new GenericCracker();
+
+ public Root getRoot()
+ {
+ return _root;
+ }
+
+ public void setRoot( Root root )
+ {
+ _root = root;
+ }
+
+ public GenericCracker getCracker()
+ {
+ return _cracker;
+ }
+
+ public void setCracker( GenericCracker cracker )
+ {
+ _cracker = cracker;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericRoot.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericService.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericService.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericService.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericService.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,31 @@
+/*
+ * $Id: GenericService.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public interface GenericService
+{
+
+ String getFullMessageFor( PersonGenericObject person, Object... arguments );
+
+ String getFullMessageFor( GameGenericObject game, Object... arguments );
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericService.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericServiceImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericServiceImpl.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericServiceImpl.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericServiceImpl.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,40 @@
+/*
+ * $Id: GenericServiceImpl.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public class GenericServiceImpl
+ implements GenericService
+{
+
+ public String getFullMessageFor( GameGenericObject game, Object... arguments )
+ {
+ game.getHappy();
+
+ return game.getDisplayName();
+ }
+
+ public String getFullMessageFor( PersonGenericObject person, Object... arguments )
+ {
+ return person.getDisplayName();
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GenericServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GetterMethods.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GetterMethods.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GetterMethods.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GetterMethods.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,44 @@
+/*
+ * $Id: GetterMethods.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public class GetterMethods
+{
+
+ private int theInt = 1;
+
+ public boolean isAllowDisplay( Object something )
+ {
+ return true;
+ }
+
+ public int getAllowDisplay()
+ {
+ return theInt;
+ }
+
+ public void setAllowDisplay( int val )
+ {
+ theInt = val;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/GetterMethods.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IComponent.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IComponent.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IComponent.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IComponent.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,35 @@
+/*
+ * $Id: IComponent.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public interface IComponent
+{
+
+ String getClientId();
+
+ void setClientId( String id );
+
+ int getCount( String index );
+
+ void setCount( String index, int count );
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IComponent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IContentProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IContentProvider.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IContentProvider.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IContentProvider.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,31 @@
+/*
+ * $Id: IContentProvider.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+import java.util.List;
+
+/**
+ *
+ */
+public interface IContentProvider
+{
+
+ public List getElements();
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IContentProvider.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IForm.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IForm.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IForm.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IForm.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,29 @@
+/*
+ * $Id: IForm.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public interface IForm
+ extends IComponent
+{
+
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IForm.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IFormComponent.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IFormComponent.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IFormComponent.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IFormComponent.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,34 @@
+/*
+ * $Id: IFormComponent.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public interface IFormComponent
+ extends IComponent
+{
+
+ String getClientId();
+
+ IForm getForm();
+
+ void setForm( IForm form );
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IFormComponent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ITreeContentProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ITreeContentProvider.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ITreeContentProvider.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ITreeContentProvider.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,34 @@
+/*
+ * $Id: ITreeContentProvider.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+import java.util.Collection;
+
+/**
+ *
+ */
+public interface ITreeContentProvider
+ extends IContentProvider
+{
+
+ public Collection getChildren( Object parentElement );
+
+ public boolean hasChildren( Object parentElement );
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ITreeContentProvider.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Indexed.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Indexed.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Indexed.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Indexed.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,105 @@
+/*
+ * $Id: Indexed.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+import java.util.*;
+
+public class Indexed
+ extends BaseIndexed
+{
+ private String[] _values = new String[] { "foo", "bar", "baz" };
+
+ private List _list = new ArrayList();
+
+ private ListSource _source = new ListSourceImpl();
+
+ private Map _props = new HashMap();
+
+ public Indexed()
+ {
+ _list.add( new Integer( 1 ) );
+ _list.add( new Integer( 2 ) );
+ _list.add( new Integer( 3 ) );
+
+ _source.addValue( new Bean2() );
+ }
+
+ public Indexed( String[] values )
+ {
+ _values = values;
+ }
+
+ /* Indexed property "_values" */
+ public String[] getValues()
+ {
+ return _values;
+ }
+
+ public void setValues( String[] value )
+ {
+ _values = value;
+ }
+
+ /**
+ * This method returns the string from the array and appends "xxx" to distinguish the "get" method from the direct
+ * array access.
+ */
+ public String getValues( int index )
+ {
+ return _values[index] + "xxx";
+ }
+
+ public void setValues( int index, String value )
+ {
+ if ( value.endsWith( "xxx" ) )
+ {
+ _values[index] = value.substring( 0, value.length() - 3 );
+ }
+ else
+ {
+ _values[index] = value;
+ }
+ }
+
+ public Collection getList()
+ {
+ return _list;
+ }
+
+ public String getTitle( int count )
+ {
+ return "Title count " + count;
+ }
+
+ public ListSource getSource()
+ {
+ return _source;
+ }
+
+ public void setProperty( String property, Object value )
+ {
+ _props.put( property, value );
+ }
+
+ public Object getProperty( String property )
+ {
+ return _props.get( property );
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Indexed.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IndexedMapObject.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IndexedMapObject.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IndexedMapObject.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IndexedMapObject.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,39 @@
+/*
+ * $Id: IndexedMapObject.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ * Simple object used to test indexed map references using "#this" references.
+ */
+public class IndexedMapObject
+{
+
+ String property;
+
+ public IndexedMapObject( String property )
+ {
+ this.property = property;
+ }
+
+ public String getProperty()
+ {
+ return property;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IndexedMapObject.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IndexedSetObject.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IndexedSetObject.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IndexedSetObject.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IndexedSetObject.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,66 @@
+/*
+ * $Id: IndexedSetObject.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+import java.util.HashMap;
+
+/**
+ * Test for OGNL-119.
+ */
+public class IndexedSetObject
+{
+
+ private final HashMap<String, Object> things = new HashMap<String, Object>();
+
+ public IndexedSetObject()
+ {
+ things.put( "x", new Container( 1 ) );
+ }
+
+ public Object getThing( String index )
+ {
+ return things.get( index );
+ }
+
+ public void setThing( String index, Object value )
+ {
+ things.put( index, value );
+ }
+
+ public static class Container
+ {
+ private int val;
+
+ public Container( int val )
+ {
+ this.val = val;
+ }
+
+ public int getVal()
+ {
+ return val;
+ }
+
+ public void setVal( int val )
+ {
+ this.val = val;
+ }
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/IndexedSetObject.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Inherited.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Inherited.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Inherited.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Inherited.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,29 @@
+/*
+ * $Id: Inherited.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public interface Inherited
+{
+
+ String getMyString();
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Inherited.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ListSource.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ListSource.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ListSource.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ListSource.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,33 @@
+/*
+ * $Id: ListSource.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+/**
+ *
+ */
+public interface ListSource
+{
+
+ public int getTotal();
+
+ public Object addValue( Object value );
+
+ public Object getName();
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ListSource.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ListSourceImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ListSourceImpl.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ListSourceImpl.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ListSourceImpl.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,50 @@
+/*
+ * $Id: ListSourceImpl.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+import java.util.ArrayList;
+
+/**
+ *
+ */
+public class ListSourceImpl
+ extends ArrayList
+ implements ListSource
+{
+
+ public ListSourceImpl()
+ {
+ }
+
+ public int getTotal()
+ {
+ return super.size();
+ }
+
+ public Object addValue( Object value )
+ {
+ return super.add( value );
+ }
+
+ public Object getName()
+ {
+ return null;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ListSourceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/MenuItem.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/MenuItem.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/MenuItem.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/MenuItem.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,73 @@
+/*
+ * $Id: MenuItem.java 1103095 2011-05-14 13:18:29Z simonetripodi $
+ * 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.commons.ognl.performance.objects;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ */
+public class MenuItem
+{
+
+ private String page;
+
+ private String label;
+
+ private List<MenuItem> children = new ArrayList<MenuItem>();
+
+ public MenuItem( String page, String label )
+ {
+ this( page, label, new ArrayList<MenuItem>() );
+ }
+
+ public MenuItem( String page, String label, List<MenuItem> children )
+ {
+ this.page = page;
+ this.label = label;
+ this.children = children;
+ }
+
+ public List<MenuItem> getChildren()
+ {
+ return children;
+ }
+
+ public String getLabel()
+ {
+ return label;
+ }
+
+ public String getPage()
+ {
+ return page;
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer( "MenuItem[" );
+ sb.append( "page=" + getPage() );
+ sb.append( ",label=" + getLabel() );
+ sb.append( ",children=" + getChildren().size() );
+ sb.append( "]" );
+ return sb.toString();
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/MenuItem.java
------------------------------------------------------------------------------
svn:eol-style = native