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 [3/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/...
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Messages.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Messages.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Messages.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Messages.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,61 @@
+/*
+ * $Id: Messages.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.Map;
+
+/**
+ *
+ */
+public class Messages
+{
+
+ Map _source;
+
+ public Messages( Map source )
+ {
+ _source = source;
+ }
+
+ public String getMessage( String key )
+ {
+ return (String) _source.get( key );
+ }
+
+ public String format( String key, Object[] parms )
+ {
+ return "foo";
+ }
+
+ public String format( String key, Object param1, Object param2, Object param3 )
+ {
+ return "blah";
+ }
+
+ public String format( String key, Object param1 )
+ {
+ return "first";
+ }
+
+ public String format( String key, Object param1, Object param2 )
+ {
+ return "haha";
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Messages.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Model.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Model.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Model.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Model.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,32 @@
+/*
+ * $Id: Model.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 Model
+{
+
+ public int getOptionCount()
+ {
+ return 1;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Model.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/MyMap.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/MyMap.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/MyMap.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/MyMap.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,32 @@
+/*
+ * $Id: MyMap.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.*;
+
+/**
+ * This tests the interface inheritence test. This is a subinterface of Map and therefore should inherit the Map
+ * property accessor.
+ */
+public interface MyMap
+ extends Map
+{
+ public String getDescription();
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/MyMap.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/MyMapImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/MyMapImpl.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/MyMapImpl.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/MyMapImpl.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,108 @@
+/*
+ * $Id: MyMapImpl.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.*;
+
+/**
+ * This tests the interface inheritence test. This test implements MyMap->Map but extends Object, therefore should be
+ * coded using MapPropertyAccessor instead of ObjectPropertyAccessor.
+ */
+public class MyMapImpl
+ extends Object
+ implements MyMap
+{
+ private Map map = new HashMap();
+
+ public void clear()
+ {
+ map.clear();
+ }
+
+ public boolean containsKey( Object key )
+ {
+ return map.containsKey( key );
+ }
+
+ public boolean containsValue( Object value )
+ {
+ return map.containsValue( value );
+ }
+
+ public Set entrySet()
+ {
+ return map.entrySet();
+ }
+
+ public boolean equals( Object o )
+ {
+ return map.equals( o );
+ }
+
+ public Object get( Object key )
+ {
+ return map.get( key );
+ }
+
+ public int hashCode()
+ {
+ return map.hashCode();
+ }
+
+ public boolean isEmpty()
+ {
+ return map.isEmpty();
+ }
+
+ public Set keySet()
+ {
+ return map.keySet();
+ }
+
+ public Object put( Object key, Object value )
+ {
+ return map.put( key, value );
+ }
+
+ public void putAll( Map t )
+ {
+ map.putAll( t );
+ }
+
+ public Object remove( Object key )
+ {
+ return map.remove( key );
+ }
+
+ public int size()
+ {
+ return map.size();
+ }
+
+ public Collection values()
+ {
+ return map.values();
+ }
+
+ public String getDescription()
+ {
+ return "MyMap implementation";
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/MyMapImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ObjectIndexed.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ObjectIndexed.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ObjectIndexed.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ObjectIndexed.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,32 @@
+/*
+ * $Id: ObjectIndexed.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 ObjectIndexed
+ extends BaseObjectIndexed
+{
+ public ObjectIndexed()
+ {
+ super();
+ setAttribute( "foo", "bar" );
+ setAttribute( "bar", "baz" );
+ setAttribute( "other", new OtherObjectIndexed() );
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/ObjectIndexed.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/OtherObjectIndexed.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/OtherObjectIndexed.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/OtherObjectIndexed.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/OtherObjectIndexed.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,31 @@
+/*
+ * $Id: OtherObjectIndexed.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 OtherObjectIndexed
+ extends BaseObjectIndexed
+{
+ public OtherObjectIndexed()
+ {
+ super();
+ setAttribute( "foo", "bar" );
+ setAttribute( "bar", "baz" );
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/OtherObjectIndexed.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/PersonGenericObject.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/PersonGenericObject.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/PersonGenericObject.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/PersonGenericObject.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,38 @@
+/*
+ * $Id: PersonGenericObject.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 PersonGenericObject
+ implements GenericObject
+{
+
+ public int getId()
+ {
+ return 1;
+ }
+
+ public String getDisplayName()
+ {
+ return "Henry Collins";
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/PersonGenericObject.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/PropertyHolder.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/PropertyHolder.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/PropertyHolder.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/PropertyHolder.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,60 @@
+/*
+ * $Id: PropertyHolder.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 class used to test various kind of property resolutions.
+ */
+public class PropertyHolder
+{
+
+ String _value = "";
+
+ String _search = "foo";
+
+ public String getValue()
+ {
+ return _value;
+ }
+
+ public void setValue( String value )
+ {
+ _value = value;
+ }
+
+ public boolean hasValue()
+ {
+ return _value != null && _value.length() > 0;
+ }
+
+ public void setSearch( String value )
+ {
+ _search = value;
+ }
+
+ public String getSearch()
+ {
+ return _search;
+ }
+
+ public void search()
+ {
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/PropertyHolder.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Root.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Root.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Root.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Root.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,593 @@
+/*
+ * $Id: Root.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 org.apache.commons.ognl.DynamicSubscript;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+public class Root
+ extends Object
+{
+ public static final String SIZE_STRING = "size";
+
+ public static final int STATIC_INT = 23;
+
+ private int[] array = { 1, 2, 3, 4 };
+
+ private Map map = new HashMap( 23 );
+
+ private MyMap myMap = new MyMapImpl();
+
+ private List list = Arrays.asList( new Object[] { null, this, array } );
+
+ private List settableList = new ArrayList( Arrays.asList( new Object[] { "foo", "bar", "baz" } ) );
+
+ private int index = 1;
+
+ private int intValue = 0;
+
+ private String stringValue;
+
+ private int yetAnotherIntValue = 46;
+
+ private boolean privateAccessorBooleanValue = true;
+
+ private int privateAccessorIntValue = 67;
+
+ private int privateAccessorIntValue2 = 67;
+
+ private int privateAccessorIntValue3 = 67;
+
+ public String anotherStringValue = "foo";
+
+ public int anotherIntValue = 123;
+
+ public int six = 6;
+
+ private boolean _disabled;
+
+ private Locale _selected = Locale.getDefault();
+
+ private List<List<Boolean>> _booleanValues = new ArrayList<List<Boolean>>();
+
+ private boolean[] _booleanArray = { true, false, true, true };
+
+ private List _list;
+
+ private int verbosity = 87;
+
+ private BeanProvider _beanProvider = new BeanProviderImpl();
+
+ private boolean _render;
+
+ private Boolean _readOnly = Boolean.FALSE;
+
+ private Integer _objIndex = new Integer( 1 );
+
+ private Object _genericObjIndex = new Integer( 2 );
+
+ private Date _date = new Date();
+
+ private boolean _openWindow = false;
+
+ private ITreeContentProvider _contentProvider = new TreeContentProvider();
+
+ private Indexed _indexed = new Indexed();
+
+ private SearchTab _tab = new SearchTab();
+
+ /*
+ * =================================================================== Public static methods
+ * ===================================================================
+ */
+ public static int getStaticInt()
+ {
+ return STATIC_INT;
+ }
+
+ /*
+ * =================================================================== Constructors
+ * ===================================================================
+ */
+ public Root()
+ {
+ super();
+ }
+
+ /*
+ * =================================================================== Private methods
+ * ===================================================================
+ */
+ {
+ map.put( "test", this );
+ map.put( "array", array );
+ map.put( "list", list );
+ map.put( "size", new Integer( 5000 ) );
+ map.put( DynamicSubscript.first, new Integer( 99 ) );
+ map.put( "baz", array );
+ map.put( "value", new Bean2() );
+ map.put( "bar", new Bean3() );
+ map.put( new Long( 82 ), "StringStuff=someValue" );
+
+ IFormComponent comp = new FormComponentImpl();
+ comp.setClientId( "formComponent" );
+
+ IForm form = new FormImpl();
+ form.setClientId( "form1" );
+ comp.setForm( form );
+
+ map.put( "comp", comp );
+
+ Map newMap = new HashMap();
+ Map chain = new HashMap();
+ newMap.put( "deep", chain );
+
+ chain.put( "last", Boolean.TRUE );
+
+ map.put( "nested", newMap );
+
+ /* make myMap identical */
+ myMap.putAll( map );
+
+ List<Boolean> bool1 = new ArrayList<Boolean>();
+ bool1.add( Boolean.TRUE );
+ bool1.add( Boolean.FALSE );
+ bool1.add( Boolean.TRUE );
+
+ _booleanValues.add( bool1 );
+
+ List<Boolean> bool2 = new ArrayList<Boolean>();
+ bool2.add( Boolean.TRUE );
+ bool2.add( Boolean.FALSE );
+ bool2.add( Boolean.TRUE );
+
+ _booleanValues.add( bool2 );
+ }
+
+ private boolean isPrivateAccessorBooleanValue()
+ {
+ return privateAccessorBooleanValue;
+ }
+
+ private void setPrivateAccessorBooleanValue( boolean value )
+ {
+ privateAccessorBooleanValue = value;
+ }
+
+ private int getPrivateAccessorIntValue()
+ {
+ return privateAccessorIntValue;
+ }
+
+ private void setPrivateAccessorIntValue( int value )
+ {
+ privateAccessorIntValue = value;
+ }
+
+ /*
+ * =================================================================== Protected methods
+ * ===================================================================
+ */
+ protected int getPrivateAccessorIntValue2()
+ {
+ return privateAccessorIntValue2;
+ }
+
+ protected void setPrivateAccessorIntValue2( int value )
+ {
+ privateAccessorIntValue2 = value;
+ }
+
+ /*
+ * =================================================================== Package protected methods
+ * ===================================================================
+ */
+ int getPrivateAccessorIntValue3()
+ {
+ return privateAccessorIntValue3;
+ }
+
+ void setPrivateAccessorIntValue3( int value )
+ {
+ privateAccessorIntValue3 = value;
+ }
+
+ /*
+ * =================================================================== Public methods
+ * ===================================================================
+ */
+ public int[] getArray()
+ {
+ return array;
+ }
+
+ public boolean[] getBooleanArray()
+ {
+ return _booleanArray;
+ }
+
+ public void setArray( int[] value )
+ {
+ array = value;
+ }
+
+ public String format( String key, Object value )
+ {
+ return format( key, new Object[] { value } );
+ }
+
+ public String format( String key, Object[] value )
+ {
+ return "formatted";
+ }
+
+ public String getCurrentClass( String value )
+ {
+ return value + " stop";
+ }
+
+ public Messages getMessages()
+ {
+ return new Messages( map );
+ }
+
+ public Map getMap()
+ {
+ return map;
+ }
+
+ public MyMap getMyMap()
+ {
+ return myMap;
+ }
+
+ public List getList()
+ {
+ return list;
+ }
+
+ public Object getAsset( String key )
+ {
+ return key;
+ }
+
+ public List getSettableList()
+ {
+ return settableList;
+ }
+
+ public int getIndex()
+ {
+ return index;
+ }
+
+ public Integer getObjectIndex()
+ {
+ return _objIndex;
+ }
+
+ public Integer getNullIndex()
+ {
+ return null;
+ }
+
+ public Object getGenericIndex()
+ {
+ return _genericObjIndex;
+ }
+
+ public int getIntValue()
+ {
+ return intValue;
+ }
+
+ public void setIntValue( int value )
+ {
+ intValue = value;
+ }
+
+ public int getTheInt()
+ {
+ return six;
+ }
+
+ public String getStringValue()
+ {
+ return stringValue;
+ }
+
+ public void setStringValue( String value )
+ {
+ stringValue = value;
+ }
+
+ public String getIndexedStringValue()
+ {
+ return "array";
+ }
+
+ public Object getNullObject()
+ {
+ return null;
+ }
+
+ public String getTestString()
+ {
+ return "wiggle";
+ }
+
+ public Object getProperty()
+ {
+ return new Bean2();
+ }
+
+ public Bean2 getBean2()
+ {
+ return new Bean2();
+ }
+
+ public Object getIndexedProperty( String name )
+ {
+ return myMap.get( name );
+ }
+
+ public Indexed getIndexer()
+ {
+ return _indexed;
+ }
+
+ public BeanProvider getBeans()
+ {
+ return _beanProvider;
+ }
+
+ public boolean getBooleanValue()
+ {
+ return _disabled;
+ }
+
+ public void setBooleanValue( boolean value )
+ {
+ _disabled = value;
+ }
+
+ public boolean getDisabled()
+ {
+ return _disabled;
+ }
+
+ public void setDisabled( boolean disabled )
+ {
+ _disabled = disabled;
+ }
+
+ public Locale getSelected()
+ {
+ return _selected;
+ }
+
+ public void setSelected( Locale locale )
+ {
+ _selected = locale;
+ }
+
+ public Locale getCurrLocale()
+ {
+ return Locale.getDefault();
+ }
+
+ public int getCurrentLocaleVerbosity()
+ {
+ return verbosity;
+ }
+
+ public boolean getRenderNavigation()
+ {
+ return _render;
+ }
+
+ public void setSelectedList( List selected )
+ {
+ _list = selected;
+ }
+
+ public List getSelectedList()
+ {
+ return _list;
+ }
+
+ public Boolean getReadonly()
+ {
+ return _readOnly;
+ }
+
+ public void setReadonly( Boolean value )
+ {
+ _readOnly = value;
+ }
+
+ public Object getSelf()
+ {
+ return this;
+ }
+
+ public Date getTestDate()
+ {
+ return _date;
+ }
+
+ public String getWidth()
+ {
+ return "238px";
+ }
+
+ public Long getTheLong()
+ {
+ return new Long( 4 );
+ }
+
+ public boolean isSorted()
+ {
+ return true;
+ }
+
+ public TestClass getMyTest()
+ {
+ return new TestImpl();
+ }
+
+ public ITreeContentProvider getContentProvider()
+ {
+ return _contentProvider;
+ }
+
+ public boolean isPrintDelivery()
+ {
+ return true;
+ }
+
+ public Long getCurrentDeliveryId()
+ {
+ return 1l;
+ }
+
+ public Boolean isFlyingMonkey()
+ {
+ return Boolean.TRUE;
+ }
+
+ public Boolean isDumb()
+ {
+ return Boolean.FALSE;
+ }
+
+ public Date getExpiration()
+ {
+ return null;
+ }
+
+ public Long getMapKey()
+ {
+ return new Long( 82 );
+ }
+
+ public Object getArrayValue()
+ {
+ return new Object[] { new Integer( "2" ), new Integer( "2" ) };
+ }
+
+ public List getResult()
+ {
+ List list = new ArrayList();
+ list.add( new Object[] { new Integer( "2" ), new Integer( "2" ) } );
+ list.add( new Object[] { new Integer( "2" ), new Integer( "2" ) } );
+ list.add( new Object[] { new Integer( "2" ), new Integer( "2" ) } );
+
+ return list;
+ }
+
+ public boolean isEditorDisabled()
+ {
+ return false;
+ }
+
+ public boolean isDisabled()
+ {
+ return true;
+ }
+
+ public boolean isOpenTransitionWin()
+ {
+ return _openWindow;
+ }
+
+ public void setOpenTransitionWin( boolean value )
+ {
+ _openWindow = value;
+ }
+
+ public boolean isOk( SimpleEnum value, String otherValue )
+ {
+ return true;
+ }
+
+ public List<List<Boolean>> getBooleanValues()
+ {
+ return _booleanValues;
+ }
+
+ public int getIndex1()
+ {
+ return 1;
+ }
+
+ public int getIndex2()
+ {
+ return 1;
+ }
+
+ public SearchTab getTab()
+ {
+ return _tab;
+ }
+
+ public void setTab( SearchTab tab )
+ {
+ _tab = tab;
+ }
+
+ public static class A
+ {
+ public int methodOfA( B b )
+ {
+ return 0;
+ }
+
+ public int getIntValue()
+ {
+ return 1;
+ }
+ }
+
+ public static class B
+ {
+ public int methodOfB( int i )
+ {
+ return 0;
+ }
+ }
+
+ public A getA()
+ {
+ return new A();
+ }
+
+ public B getB()
+ {
+ return new B();
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Root.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SearchCriteria.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SearchCriteria.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SearchCriteria.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SearchCriteria.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,39 @@
+/*
+ * $Id: SearchCriteria.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;
+
+/**
+ * Test for OGNL-131.
+ */
+public class SearchCriteria
+{
+
+ String _displayName;
+
+ public SearchCriteria( String name )
+ {
+ _displayName = name;
+ }
+
+ public String getDisplayName()
+ {
+ return _displayName;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SearchCriteria.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SearchTab.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SearchTab.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SearchTab.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SearchTab.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,85 @@
+/*
+ * $Id: SearchTab.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.Arrays;
+import java.util.List;
+
+/**
+ * Test for OGNL-131.
+ */
+public class SearchTab
+{
+
+ /**
+ * Flags stating which search criteria are selected
+ */
+ private List<List<Boolean>> searchCriteriaSelections = new ArrayList<List<Boolean>>();
+ {
+ searchCriteriaSelections.add( Arrays.asList( Boolean.TRUE, Boolean.FALSE, Boolean.FALSE ) );
+ searchCriteriaSelections.add( Arrays.asList( Boolean.FALSE, Boolean.TRUE, Boolean.TRUE ) );
+ }
+
+ public List<List<Boolean>> getSearchCriteriaSelections()
+ {
+ return this.searchCriteriaSelections;
+ }
+
+ public void setSearchCriteriaSelections( List<List<Boolean>> selections )
+ {
+ this.searchCriteriaSelections = selections;
+ }
+
+ /**
+ * Filters that can be applied to this tabs searches
+ */
+ private List<SearchCriteria> searchCriteria = new ArrayList<SearchCriteria>();
+ {
+ searchCriteria.add( new SearchCriteria( "Crittery critters" ) );
+ searchCriteria.add( new SearchCriteria( "Woodland creatures" ) );
+ }
+
+ public List<SearchCriteria> getSearchCriteria()
+ {
+ return this.searchCriteria;
+ }
+
+ public void setSearchCriteria( List<SearchCriteria> searchCriteria )
+ {
+ this.searchCriteria = searchCriteria;
+ }
+
+ /**
+ * 2D list of options available for each criteria
+ */
+ private List<List<String>> searchCriteriaOptions = new ArrayList<List<String>>();
+
+ public List<List<String>> getSearchCriteriaOptions()
+ {
+ return this.searchCriteriaOptions;
+ }
+
+ public void setSearchCriteriaOptions( List<List<String>> searchCriteriaOptions )
+ {
+
+ this.searchCriteriaOptions = searchCriteriaOptions;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SearchTab.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SecondBean.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SecondBean.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SecondBean.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SecondBean.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,35 @@
+/*
+ * $Id: SecondBean.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 SecondBean
+ extends BaseBean
+{
+ public String getName()
+ {
+ return "SecondBean";
+ }
+
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SecondBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SetterReturns.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SetterReturns.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SetterReturns.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SetterReturns.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,40 @@
+/*
+ * $Id: SetterReturns.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 SetterReturns
+{
+
+ private String _value = "";
+
+ public String getValue()
+ {
+ return _value;
+ }
+
+ public SetterReturns setValue( String value )
+ {
+ _value += value;
+ return this;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SetterReturns.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Simple.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Simple.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Simple.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Simple.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,226 @@
+/*
+ * $Id: Simple.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.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.HashMap;
+import java.util.Map;
+
+public class Simple
+ extends Object
+{
+ private String stringValue = "test";
+
+ private float floatValue;
+
+ private int intValue;
+
+ private boolean booleanValue;
+
+ private BigInteger bigIntValue = BigInteger.valueOf( 0 );
+
+ private BigDecimal bigDecValue = new BigDecimal( 0.0 );
+
+ private Root root = new Root();
+
+ private Bean3 _bean;
+
+ private Bean2 _bean2;
+
+ private Object[] _array;
+
+ private Messages _messages;
+
+ public Simple()
+ {
+ Map src = new HashMap();
+ src.put( "test", "This is a test" );
+
+ _messages = new Messages( src );
+ }
+
+ public Simple( Bean3 bean )
+ {
+ _bean = bean;
+ }
+
+ public Simple( Bean2 bean )
+ {
+ _bean2 = bean;
+ }
+
+ public Simple( Object[] values )
+ {
+ super();
+ }
+
+ public Simple( String stringValue, float floatValue, int intValue )
+ {
+ super();
+ this.stringValue = stringValue;
+ this.floatValue = floatValue;
+ this.intValue = intValue;
+ }
+
+ public void setValues( String stringValue, float floatValue, int intValue )
+ {
+ this.stringValue = stringValue;
+ this.floatValue = floatValue;
+ this.intValue = intValue;
+ }
+
+ public String getStringValue()
+ {
+ return stringValue;
+ }
+
+ public void setStringValue( String value )
+ {
+ stringValue = value;
+ }
+
+ public float getFloatValue()
+ {
+ return floatValue;
+ }
+
+ public void setFloatValue( float value )
+ {
+ floatValue = value;
+ }
+
+ public int getIntValue()
+ {
+ return intValue;
+ }
+
+ public void setIntValue( int value )
+ {
+ intValue = value;
+ }
+
+ public boolean getValueIsTrue( Object currValue )
+ {
+ return true;
+ }
+
+ public boolean getBooleanValue()
+ {
+ return booleanValue;
+ }
+
+ public void setBooleanValue( boolean value )
+ {
+ booleanValue = value;
+ }
+
+ public BigInteger getBigIntValue()
+ {
+ return bigIntValue;
+ }
+
+ public void setArray( Object[] values )
+ {
+ _array = values;
+ }
+
+ public Object[] getArray()
+ {
+ return _array;
+ }
+
+ public void setBigIntValue( BigInteger value )
+ {
+ bigIntValue = value;
+ }
+
+ public BigDecimal getBigDecValue()
+ {
+ return bigDecValue;
+ }
+
+ public void setBigDecValue( BigDecimal value )
+ {
+ bigDecValue = value;
+ }
+
+ public Root getRootValue()
+ {
+ return root;
+ }
+
+ public Messages getMessages()
+ {
+ return _messages;
+ }
+
+ public int getOne()
+ {
+ return 1;
+ }
+
+ public int getTwo()
+ {
+ return 2;
+ }
+
+ public int getThree()
+ {
+ return 3;
+ }
+
+ public int getTestValue( int val )
+ {
+ return val + 1;
+ }
+
+ public boolean isEditorDisabled()
+ {
+ return false;
+ }
+
+ public boolean isDisabled()
+ {
+ return true;
+ }
+
+ public GetterMethods getMethodsTest()
+ {
+ return new GetterMethods();
+ }
+
+ public String getDisplayValue( int val )
+ {
+ return "test";
+ }
+
+ public boolean equals( Object other )
+ {
+
+ return false;
+ }
+
+ public boolean isThisVarArgsWorking( Object... arguments )
+ {
+ return true;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Simple.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SimpleEnum.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SimpleEnum.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SimpleEnum.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SimpleEnum.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,41 @@
+/*
+ * $Id: SimpleEnum.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 enum SimpleEnum
+{
+
+ ONE( 1 );
+
+ private int _value;
+
+ private SimpleEnum( int value )
+ {
+ _value = value;
+ }
+
+ public int getValue()
+ {
+ return _value;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SimpleEnum.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SimpleNumeric.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SimpleNumeric.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SimpleNumeric.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SimpleNumeric.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,42 @@
+/*
+ * $Id: SimpleNumeric.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 for {@link org.apache.commons.ognl.test.PropertyArithmeticAndLogicalOperatorsTest}.
+ */
+public class SimpleNumeric
+{
+
+ public double getBudget()
+ {
+ return 140;
+ }
+
+ public double getTimeBilled()
+ {
+ return 24.12;
+ }
+
+ public String getTableSize()
+ {
+ return "10";
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SimpleNumeric.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SubclassSyntheticObject.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SubclassSyntheticObject.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SubclassSyntheticObject.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SubclassSyntheticObject.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,35 @@
+/*
+ * $Id: SubclassSyntheticObject.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;
+
+/**
+ * Simple subclass.
+ */
+public class SubclassSyntheticObject
+ extends BaseSyntheticObject
+{
+
+ public ArrayList getList()
+ {
+ return new ArrayList();
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/SubclassSyntheticObject.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestClass.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestClass.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestClass.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestClass.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,28 @@
+/*
+ * $Id: TestClass.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 abstract class TestClass
+{
+
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestClass.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestImpl.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestImpl.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestImpl.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,38 @@
+/*
+ * $Id: TestImpl.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 TestImpl
+ extends TestClass
+{
+
+ public Map<String, String> getTheMap()
+ {
+ Map<String, String> map = new HashMap();
+ map.put( "key", "value" );
+ return map;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestInherited1.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestInherited1.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestInherited1.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestInherited1.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,33 @@
+/*
+ * $Id: TestInherited1.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 TestInherited1
+ implements Inherited
+{
+
+ public String getMyString()
+ {
+ return "inherited1";
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestInherited1.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestInherited2.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestInherited2.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestInherited2.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestInherited2.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,33 @@
+/*
+ * $Id: TestInherited2.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 TestInherited2
+ implements Inherited
+{
+
+ public String getMyString()
+ {
+ return "inherited2";
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestInherited2.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestModel.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestModel.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestModel.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestModel.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,47 @@
+/*
+ * $Id: TestModel.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 TestModel
+{
+
+ public Copy getCopy()
+ {
+ return new Copy();
+ }
+
+ public Model getUnassignedCopyModel()
+ {
+ return new Model();
+ }
+
+ public boolean isCanApproveCopy()
+ {
+ return true;
+ }
+
+ public Entry getEntry()
+ {
+ return new Entry();
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TestModel.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TreeContentProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TreeContentProvider.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TreeContentProvider.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TreeContentProvider.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,47 @@
+/*
+ * $Id: TreeContentProvider.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;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ *
+ */
+public class TreeContentProvider
+ implements ITreeContentProvider
+{
+
+ public Collection getChildren( Object parentElement )
+ {
+ return Collections.EMPTY_LIST;
+ }
+
+ public boolean hasChildren( Object parentElement )
+ {
+ return true;
+ }
+
+ public List getElements()
+ {
+ return Collections.EMPTY_LIST;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/TreeContentProvider.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Two.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Two.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Two.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Two.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,37 @@
+/*
+ * $Id: Two.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 Two
+{
+
+ public String getMessage( String mes )
+ {
+ return "[" + mes + "]";
+ }
+
+ public boolean hasChildren( String name )
+ {
+ return name.length() > 2;
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/objects/Two.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/runtime/CommonsRuntimeWrapper.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/runtime/CommonsRuntimeWrapper.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/runtime/CommonsRuntimeWrapper.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/runtime/CommonsRuntimeWrapper.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,97 @@
+package org.apache.commons.ognl.performance.runtime;
+
+import org.apache.commons.ognl.OgnlRuntime;
+import org.apache.commons.ognl.internal.HashMapCacheFactory;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+/**
+ * User: Maurizio Cucchiara
+ * Date: 10/22/11
+ * Time: 12:38 AM
+ */
+public class CommonsRuntimeWrapper
+ implements RuntimeWrapper
+{
+ public CommonsRuntimeWrapper( )
+ {
+ OgnlRuntime.setCacheFactory( new HashMapCacheFactory() );
+ }
+
+ @Override
+ public void getFields( Class<?> c )
+ throws Exception
+ {
+ OgnlRuntime.getFields( c );
+ }
+
+ @Override
+ public void findParameterTypes( Class<?> targetClass, Method method )
+ throws Exception
+ {
+ OgnlRuntime.findParameterTypes( targetClass, method );
+ }
+
+ @Override
+ public void getConstructors( Class<?> c )
+ throws Exception
+ {
+ OgnlRuntime.getConstructors( c );
+ }
+
+ @Override
+ public void getMethods( Class<?> c, boolean staticMethods )
+ throws Exception
+ {
+ OgnlRuntime.getMethods( c, staticMethods );
+ }
+
+ @Override
+ public void getDeclaredMethods( Class<?> c, String propertyName, boolean setters )
+ throws Exception
+ {
+ OgnlRuntime.getDeclaredMethods( c, propertyName, setters );
+ }
+
+ @Override
+ public void getParameterTypes( Method method )
+ throws Exception
+ {
+ OgnlRuntime.getParameterTypes( method );
+ }
+
+ @Override
+ public void getParameterTypes( Constructor<?> constructor )
+ throws Exception
+ {
+ OgnlRuntime.getParameterTypes( constructor );
+ }
+
+ @Override
+ public void getPermission( Method method )
+ throws Exception
+ {
+ OgnlRuntime.getPermission( method );
+ }
+
+ @Override
+ public void getPrimitiveDefaultValue( Class<?> type )
+ throws Exception
+ {
+ OgnlRuntime.getPrimitiveDefaultValue( type );
+ }
+
+ @Override
+ public void invokeMethod( Object o, Method method, Object[] args )
+ throws Exception
+ {
+ OgnlRuntime.invokeMethod( o, method, args );
+ }
+
+ @Override
+ public void clearCache( )
+ {
+ OgnlRuntime.clearCache( );
+ }
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/runtime/CommonsRuntimeWrapper.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/runtime/OldOgnlRuntimeWrapper.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/runtime/OldOgnlRuntimeWrapper.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/runtime/OldOgnlRuntimeWrapper.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/runtime/OldOgnlRuntimeWrapper.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,90 @@
+package org.apache.commons.ognl.performance.runtime;
+
+import ognl.OgnlRuntime;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+/**
+ * User: Maurizio Cucchiara
+ * Date: 10/22/11
+ * Time: 12:46 AM
+ */
+public class OldOgnlRuntimeWrapper
+ implements RuntimeWrapper
+{
+ @Override
+ public void getFields( Class<?> c )
+ throws Exception
+ {
+ OgnlRuntime.getFields( c );
+ }
+
+ @Override
+ public void findParameterTypes( Class<?> targetClass, Method method )
+ throws Exception
+ {
+ OgnlRuntime.findParameterTypes( targetClass, method );
+ }
+
+ @Override
+ public void getConstructors( Class<?> c )
+ throws Exception
+ {
+ OgnlRuntime.getConstructors( c );
+ }
+
+ @Override
+ public void getMethods( Class<?> c, boolean staticMethods )
+ throws Exception
+ {
+ OgnlRuntime.getMethods( c, staticMethods );
+ }
+
+ @Override
+ public void getDeclaredMethods( Class<?> c, String propertyName, boolean setters )
+ throws Exception
+ {
+ OgnlRuntime.getDeclaredMethods( c, propertyName, setters );
+ }
+
+ @Override
+ public void getParameterTypes( Method method )
+ throws Exception
+ {
+ OgnlRuntime.getParameterTypes( method );
+ }
+
+ @Override
+ public void getParameterTypes( Constructor<?> constructor )
+ throws Exception
+ {
+ OgnlRuntime.getParameterTypes( constructor );
+ }
+
+ @Override
+ public void getPermission( Method method )
+ throws Exception
+ {
+ OgnlRuntime.getPermission( method );
+ }
+
+ @Override
+ public void getPrimitiveDefaultValue( Class<?> type )
+ throws Exception
+ {
+ OgnlRuntime.getPrimitiveDefaultValue( type );
+ }
+
+ @Override
+ public void invokeMethod( Object o, Method method, Object[] args )
+ throws Exception
+ {
+ OgnlRuntime.invokeMethod( o, method, args );
+ }
+
+ @Override
+ public void clearCache( )
+ {
+ OgnlRuntime.clearCache( );
+ }}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/runtime/OldOgnlRuntimeWrapper.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/runtime/RuntimeWrapper.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/runtime/RuntimeWrapper.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/runtime/RuntimeWrapper.java (added)
+++ commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/runtime/RuntimeWrapper.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,33 @@
+package org.apache.commons.ognl.performance.runtime;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+/**
+ * User: mcucchiara
+ * Date: 19/10/11
+ * Time: 9.37
+ */
+public interface RuntimeWrapper {
+ void getFields(Class<?> c) throws Exception;
+
+ void findParameterTypes(Class<?> targetClass, Method method) throws Exception;
+
+ void getConstructors(Class<?> c) throws Exception;
+
+ void getMethods(Class<?> c, boolean staticMethods) throws Exception;
+
+ void getDeclaredMethods(Class<?> c, String propertyName, boolean setters) throws Exception;
+
+ void getParameterTypes(Method method) throws Exception;
+
+ void getParameterTypes(Constructor<?> constructor) throws Exception;
+
+ void getPermission(Method method) throws Exception;
+
+ void getPrimitiveDefaultValue(Class<?> type) throws Exception;
+
+ void invokeMethod(Object o, Method method, Object[] args) throws Exception;
+
+ void clearCache();
+}
Propchange: commons/proper/ognl/src/main/java/org/apache/commons/ognl/performance/runtime/RuntimeWrapper.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/main/resources/log4j.xml
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/main/resources/log4j.xml?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/main/resources/log4j.xml (added)
+++ commons/proper/ognl/src/main/resources/log4j.xml Sat Oct 22 01:05:29 2011
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+ <appender name="console" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p (%l) - %m%n"/>
+ </layout>
+ </appender>
+ <root>
+ <priority value="info"/>
+ <appender-ref ref="console"/>
+ </root>
+
+</log4j:configuration>
Propchange: commons/proper/ognl/src/main/resources/log4j.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/test/java/org/apache/commons/ognl/performance/PerformanceCommonsOgnlTest.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/test/java/org/apache/commons/ognl/performance/PerformanceCommonsOgnlTest.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/test/java/org/apache/commons/ognl/performance/PerformanceCommonsOgnlTest.java (added)
+++ commons/proper/ognl/src/test/java/org/apache/commons/ognl/performance/PerformanceCommonsOgnlTest.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,122 @@
+package org.apache.commons.ognl.performance;
+
+import com.carrotsearch.junitbenchmarks.BenchmarkOptions;
+import com.carrotsearch.junitbenchmarks.BenchmarkRule;
+import com.carrotsearch.junitbenchmarks.annotation.AxisRange;
+import com.carrotsearch.junitbenchmarks.annotation.BenchmarkHistoryChart;
+import com.carrotsearch.junitbenchmarks.annotation.BenchmarkMethodChart;
+import com.carrotsearch.junitbenchmarks.annotation.LabelType;
+import org.apache.commons.ognl.performance.invocation.FieldInvocation;
+import org.apache.commons.ognl.performance.invocation.FindParameterTypesInvocation;
+import org.apache.commons.ognl.performance.invocation.GetConstructorsInvocation;
+import org.apache.commons.ognl.performance.invocation.GetDeclaredMethodsInvocation;
+import org.apache.commons.ognl.performance.invocation.GetMethodsInvocation;
+import org.apache.commons.ognl.performance.invocation.MethodParameterTypesInvocation;
+import org.apache.commons.ognl.performance.invocation.PermissionInvocation;
+import org.apache.commons.ognl.performance.invocation.PrimitiveDefaultInvocation;
+import org.apache.commons.ognl.performance.runtime.CommonsRuntimeWrapper;
+import org.apache.commons.ognl.performance.runtime.OldOgnlRuntimeWrapper;
+import org.apache.commons.ognl.performance.runtime.RuntimeWrapper;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.MethodRule;
+
+/**
+ * User: Maurizio Cucchiara
+ * Date: 10/22/11
+ * Time: 12:49 AM
+ */
+
+@AxisRange( min = 0, max = 1 )
+@BenchmarkMethodChart( filePrefix = "benchmark-commons-ognl" )
+@BenchmarkHistoryChart( labelWith = LabelType.CUSTOM_KEY, maxRuns = 20 )
+public class PerformanceCommonsOgnlTest
+{
+ @Rule
+ public MethodRule benchmarkRun = new BenchmarkRule( );
+
+ public static final RuntimeWrapper COMMONS_RUNTIME_WRAPPER = new CommonsRuntimeWrapper( );
+
+ public static final RuntimeWrapper OLD_RUNTIME_WRAPPER = new OldOgnlRuntimeWrapper( );
+
+ protected static RuntimeWrapper runtimeWrapper;
+
+ @BenchmarkOptions( benchmarkRounds = 50, warmupRounds = 0, concurrency = 1000 )
+ @Test
+ public void constructorCache( )
+ throws Exception
+ {
+ new GetConstructorsInvocation( runtimeWrapper );
+ }
+
+ @BenchmarkOptions( benchmarkRounds = 50, warmupRounds = 0, concurrency = 1000 )
+ @Test
+ public void declaredMethodCache( )
+ throws Exception
+ {
+ new GetDeclaredMethodsInvocation( runtimeWrapper );
+ }
+
+
+ @BenchmarkOptions( benchmarkRounds = 50, warmupRounds = 0, concurrency = 1000 )
+ @Test
+ public void fieldCache( )
+ throws Exception
+ {
+ new FieldInvocation( runtimeWrapper );
+ }
+
+ @BenchmarkOptions( benchmarkRounds = 50, warmupRounds = 0, concurrency = 1000 )
+ @Test
+ public void findParameterTypeCache( )
+ throws Exception
+ {
+ new FindParameterTypesInvocation( runtimeWrapper, 200 );
+ }
+
+ @BenchmarkOptions( benchmarkRounds = 50, warmupRounds = 0, concurrency = 1000 )
+ @Test
+ public void methodCache( )
+ throws Exception
+ {
+ new GetMethodsInvocation( runtimeWrapper );
+ }
+
+ @BenchmarkOptions( benchmarkRounds = 50, warmupRounds = 0, concurrency = 1000 )
+ @Test
+ public void methodParameterTypeCache( )
+ throws Exception
+ {
+ new MethodParameterTypesInvocation( runtimeWrapper );
+ }
+
+ @BenchmarkOptions( benchmarkRounds = 50, warmupRounds = 0, concurrency = 1000 )
+ @Test
+ public void permissionCache( )
+ throws Exception
+ {
+ new PermissionInvocation( runtimeWrapper );
+ }
+
+ @BenchmarkOptions( benchmarkRounds = 50, warmupRounds = 0, concurrency = 1000 )
+ @Test
+ public void primitiveCache( )
+ throws Exception
+ {
+ new PrimitiveDefaultInvocation( runtimeWrapper, 100000 );
+ }
+
+ @BeforeClass
+ public static void before( )
+ {
+ runtimeWrapper = COMMONS_RUNTIME_WRAPPER;
+ }
+
+ @AfterClass
+ public static void after( )
+ {
+ runtimeWrapper.clearCache( );
+ }
+}
Propchange: commons/proper/ognl/src/test/java/org/apache/commons/ognl/performance/PerformanceCommonsOgnlTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/proper/ognl/src/test/java/org/apache/commons/ognl/performance/PerformanceOldOgnlTest.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/src/test/java/org/apache/commons/ognl/performance/PerformanceOldOgnlTest.java?rev=1187613&view=auto
==============================================================================
--- commons/proper/ognl/src/test/java/org/apache/commons/ognl/performance/PerformanceOldOgnlTest.java (added)
+++ commons/proper/ognl/src/test/java/org/apache/commons/ognl/performance/PerformanceOldOgnlTest.java Sat Oct 22 01:05:29 2011
@@ -0,0 +1,31 @@
+package org.apache.commons.ognl.performance;
+
+import com.carrotsearch.junitbenchmarks.annotation.AxisRange;
+import com.carrotsearch.junitbenchmarks.annotation.BenchmarkHistoryChart;
+import com.carrotsearch.junitbenchmarks.annotation.BenchmarkMethodChart;
+import com.carrotsearch.junitbenchmarks.annotation.LabelType;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+/**
+ * User: Maurizio Cucchiara
+ * Date: 10/22/11
+ * Time: 12:49 AM
+ */
+
+@AxisRange( min = 0, max = 1 )
+@BenchmarkMethodChart(filePrefix = "benchmark-old-ognl")
+@BenchmarkHistoryChart( labelWith = LabelType.CUSTOM_KEY, maxRuns = 20 )
+public class PerformanceOldOgnlTest extends PerformanceCommonsOgnlTest
+{
+ @BeforeClass
+ public static void before( )
+ {
+ runtimeWrapper = OLD_RUNTIME_WRAPPER;
+ }
+ @AfterClass
+ public static void after( )
+ {
+ runtimeWrapper.clearCache( );
+ }
+}
Propchange: commons/proper/ognl/src/test/java/org/apache/commons/ognl/performance/PerformanceOldOgnlTest.java
------------------------------------------------------------------------------
svn:eol-style = native