incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1096928 [7/16] - in /incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel: facetdecorators/help/ facetdecorators/help/file/ facetdecorators/help/file/internal/ facetdecorators/i18n/ facetdecorators/i18n/internal...
Date Tue, 26 Apr 2011 22:03:55 GMT
Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/DirtyObjectFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/DirtyObjectFacetAbstract.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/DirtyObjectFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/DirtyObjectFacetAbstract.java Tue Apr 26 22:03:43 2011
@@ -17,19 +17,17 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.dirty;
 
-package org.apache.isis.core.progmodel.facets.object.dirty;
-
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetAbstract;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.dirty.DirtyObjectFacet;
-
-
-public abstract class DirtyObjectFacetAbstract extends FacetAbstract implements DirtyObjectFacet {
-
-    public DirtyObjectFacetAbstract(final Class<? extends Facet> type, final FacetHolder holder) {
-        super(type, holder, false);
-    }
-
-}
+
+public abstract class DirtyObjectFacetAbstract extends FacetAbstract implements DirtyObjectFacet {
+
+    public DirtyObjectFacetAbstract(final Class<? extends Facet> type, final FacetHolder holder) {
+        super(type, holder, false);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/IsDirtyObjectFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/IsDirtyObjectFacetAbstract.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/IsDirtyObjectFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/IsDirtyObjectFacetAbstract.java Tue Apr 26 22:03:43 2011
@@ -17,22 +17,20 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.dirty;
 
-package org.apache.isis.core.progmodel.facets.object.dirty;
-
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.dirty.IsDirtyObjectFacet;
-
-
-public abstract class IsDirtyObjectFacetAbstract extends DirtyObjectFacetAbstract implements IsDirtyObjectFacet {
-
-    public static Class<? extends Facet> type() {
-        return IsDirtyObjectFacet.class;
-    }
-
-    public IsDirtyObjectFacetAbstract(final FacetHolder holder) {
-        super(type(), holder);
-    }
-
-}
+
+public abstract class IsDirtyObjectFacetAbstract extends DirtyObjectFacetAbstract implements IsDirtyObjectFacet {
+
+    public static Class<? extends Facet> type() {
+        return IsDirtyObjectFacet.class;
+    }
+
+    public IsDirtyObjectFacetAbstract(final FacetHolder holder) {
+        super(type(), holder);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/MarkDirtyObjectFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/MarkDirtyObjectFacetAbstract.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/MarkDirtyObjectFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/MarkDirtyObjectFacetAbstract.java Tue Apr 26 22:03:43 2011
@@ -17,22 +17,20 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.dirty;
 
-package org.apache.isis.core.progmodel.facets.object.dirty;
-
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.dirty.MarkDirtyObjectFacet;
-
-
-public abstract class MarkDirtyObjectFacetAbstract extends DirtyObjectFacetAbstract implements MarkDirtyObjectFacet {
-
-    public static Class<? extends Facet> type() {
-        return MarkDirtyObjectFacet.class;
-    }
-
-    public MarkDirtyObjectFacetAbstract(final FacetHolder holder) {
-        super(type(), holder);
-    }
-
-}
+
+public abstract class MarkDirtyObjectFacetAbstract extends DirtyObjectFacetAbstract implements MarkDirtyObjectFacet {
+
+    public static Class<? extends Facet> type() {
+        return MarkDirtyObjectFacet.class;
+    }
+
+    public MarkDirtyObjectFacetAbstract(final FacetHolder holder) {
+        super(type(), holder);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/method/ClearDirtyObjectFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/method/ClearDirtyObjectFacetViaMethod.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/method/ClearDirtyObjectFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/method/ClearDirtyObjectFacetViaMethod.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.dirty.method;
 
 import java.lang.reflect.Method;
@@ -30,36 +29,35 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.ImperativeFacet;
 import org.apache.isis.core.progmodel.facets.object.dirty.ClearDirtyObjectFacetAbstract;
 
-
 public class ClearDirtyObjectFacetViaMethod extends ClearDirtyObjectFacetAbstract implements ImperativeFacet {
 
     private final Method method;
 
-    public ClearDirtyObjectFacetViaMethod(
-    		final Method method, 
-    		final FacetHolder holder) {
+    public ClearDirtyObjectFacetViaMethod(final Method method, final FacetHolder holder) {
         super(holder);
         this.method = method;
     }
 
     /**
-     * Returns a singleton list of the {@link Method} provided in the constructor. 
+     * Returns a singleton list of the {@link Method} provided in the constructor.
      */
+    @Override
     public List<Method> getMethods() {
-    	return Collections.singletonList(method);
+        return Collections.singletonList(method);
+    }
+
+    @Override
+    public boolean impliesResolve() {
+        return false;
     }
 
-	public boolean impliesResolve() {
-		return false;
-	}
-
-	public boolean impliesObjectChanged() {
-		return false;
-	}
-	
+    @Override
+    public boolean impliesObjectChanged() {
+        return false;
+    }
 
+    @Override
     public void invoke(final ObjectAdapter object) {
         InvokeUtils.invokeStatic(method);
     }
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/method/DirtyMethodsFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/method/DirtyMethodsFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/method/DirtyMethodsFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/method/DirtyMethodsFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.dirty.method;
 
-package org.apache.isis.core.progmodel.facets.object.dirty.method;
-
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
@@ -31,48 +30,49 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.methodutils.MethodScope;
 import org.apache.isis.core.progmodel.facets.MethodFinderUtils;
 import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
-
-
-
-public class DirtyMethodsFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
-
-    private static final String MARK_DIRTY_PREFIX = "markDirty";
-    private static final String CLEAR_DIRTY_PREFIX = "clearDirty";
-    private static final String IS_DIRTY_PREFIX = "isDirty";
-
-    private static final String[] PREFIXES = { MARK_DIRTY_PREFIX, CLEAR_DIRTY_PREFIX, IS_DIRTY_PREFIX, };
-
-    public DirtyMethodsFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY, PREFIXES);
-
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContext) {
+
+public class DirtyMethodsFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
+
+    private static final String MARK_DIRTY_PREFIX = "markDirty";
+    private static final String CLEAR_DIRTY_PREFIX = "clearDirty";
+    private static final String IS_DIRTY_PREFIX = "isDirty";
+
+    private static final String[] PREFIXES = { MARK_DIRTY_PREFIX, CLEAR_DIRTY_PREFIX, IS_DIRTY_PREFIX, };
+
+    public DirtyMethodsFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY, PREFIXES);
+
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
         final FacetHolder facetHolder = processClassContext.getFacetHolder();
         final Class<?> cls = processClassContext.getCls();
-
-        final List<Facet> facets = new ArrayList<Facet>();
-
-        Method method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, IS_DIRTY_PREFIX, boolean.class, NO_PARAMETERS_TYPES);
-        if (method != null) {
-            processClassContext.removeMethod(method);
-            facets.add(new IsDirtyObjectFacetViaMethod(method, facetHolder));
-        }
-
-        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, CLEAR_DIRTY_PREFIX, void.class, NO_PARAMETERS_TYPES);
-        if (method != null) {
-            processClassContext.removeMethod(method);
-            facets.add(new ClearDirtyObjectFacetViaMethod(method, facetHolder));
-        }
-
-        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MARK_DIRTY_PREFIX, void.class, NO_PARAMETERS_TYPES);
-        if (method != null) {
-            processClassContext.removeMethod(method);
-            facets.add(new MarkDirtyObjectFacetViaMethod(method, facetHolder));
-        }
-
-        FacetUtil.addFacets(facets);
-    }
-
-}
+
+        final List<Facet> facets = new ArrayList<Facet>();
+
+        Method method =
+            MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, IS_DIRTY_PREFIX, boolean.class, NO_PARAMETERS_TYPES);
+        if (method != null) {
+            processClassContext.removeMethod(method);
+            facets.add(new IsDirtyObjectFacetViaMethod(method, facetHolder));
+        }
+
+        method =
+            MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, CLEAR_DIRTY_PREFIX, void.class, NO_PARAMETERS_TYPES);
+        if (method != null) {
+            processClassContext.removeMethod(method);
+            facets.add(new ClearDirtyObjectFacetViaMethod(method, facetHolder));
+        }
+
+        method =
+            MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MARK_DIRTY_PREFIX, void.class, NO_PARAMETERS_TYPES);
+        if (method != null) {
+            processClassContext.removeMethod(method);
+            facets.add(new MarkDirtyObjectFacetViaMethod(method, facetHolder));
+        }
+
+        FacetUtil.addFacets(facets);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/method/IsDirtyObjectFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/method/IsDirtyObjectFacetViaMethod.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/method/IsDirtyObjectFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/method/IsDirtyObjectFacetViaMethod.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.dirty.method;
 
 import java.lang.reflect.Method;
@@ -30,35 +29,35 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.ImperativeFacet;
 import org.apache.isis.core.progmodel.facets.object.dirty.IsDirtyObjectFacetAbstract;
 
-
 public class IsDirtyObjectFacetViaMethod extends IsDirtyObjectFacetAbstract implements ImperativeFacet {
 
     private final Method method;
 
-    public IsDirtyObjectFacetViaMethod(
-    		final Method method, 
-    		final FacetHolder holder) {
+    public IsDirtyObjectFacetViaMethod(final Method method, final FacetHolder holder) {
         super(holder);
         this.method = method;
     }
 
     /**
-     * Returns a singleton list of the {@link Method} provided in the constructor. 
+     * Returns a singleton list of the {@link Method} provided in the constructor.
      */
+    @Override
     public List<Method> getMethods() {
-    	return Collections.singletonList(method);
+        return Collections.singletonList(method);
+    }
+
+    @Override
+    public boolean impliesResolve() {
+        return false;
     }
 
-	public boolean impliesResolve() {
-		return false;
-	}
-
-	public boolean impliesObjectChanged() {
-		return false;
-	}
+    @Override
+    public boolean impliesObjectChanged() {
+        return false;
+    }
 
+    @Override
     public boolean invoke(final ObjectAdapter object) {
         return ((Boolean) InvokeUtils.invokeStatic(method)).booleanValue();
     }
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/method/MarkDirtyObjectFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/method/MarkDirtyObjectFacetViaMethod.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/method/MarkDirtyObjectFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/dirty/method/MarkDirtyObjectFacetViaMethod.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.dirty.method;
 
 import java.lang.reflect.Method;
@@ -30,7 +29,6 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.ImperativeFacet;
 import org.apache.isis.core.progmodel.facets.object.dirty.MarkDirtyObjectFacetAbstract;
 
-
 public class MarkDirtyObjectFacetViaMethod extends MarkDirtyObjectFacetAbstract implements ImperativeFacet {
 
     private final Method method;
@@ -40,21 +38,24 @@ public class MarkDirtyObjectFacetViaMeth
         this.method = method;
     }
 
+    @Override
     public List<Method> getMethods() {
-    	return Collections.singletonList(method);
+        return Collections.singletonList(method);
+    }
+
+    @Override
+    public boolean impliesResolve() {
+        return false;
     }
 
-	public boolean impliesResolve() {
-		return false;
-	}
-
-	public boolean impliesObjectChanged() {
-		return false;
-	}
+    @Override
+    public boolean impliesObjectChanged() {
+        return false;
+    }
 
+    @Override
     public void invoke(final ObjectAdapter object) {
         InvokeUtils.invokeStatic(method);
     }
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableAnnotationFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableAnnotationFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableAnnotationFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.encodeable;
 
-package org.apache.isis.core.progmodel.facets.object.encodeable;
-
 import org.apache.isis.applib.annotation.Encodable;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.config.IsisConfigurationAware;
@@ -33,72 +32,75 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet;
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjector;
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjectorAware;
-
-
-public class EncodableAnnotationFacetFactory extends AnnotationBasedFacetFactoryAbstract implements IsisConfigurationAware, DependencyInjectorAware, AdapterMapAware {
-
-    private IsisConfiguration configuration;
+
+public class EncodableAnnotationFacetFactory extends AnnotationBasedFacetFactoryAbstract implements
+    IsisConfigurationAware, DependencyInjectorAware, AdapterMapAware {
+
+    private IsisConfiguration configuration;
 
     private AdapterMap adapterManager;
-    private DependencyInjector dependencyInjector;
-
-    public EncodableAnnotationFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContaxt) {
-        FacetUtil.addFacet(create(processClassContaxt.getCls(), processClassContaxt.getFacetHolder()));
-    }
-
-    /**
-     * Returns a {@link EncodableFacet} implementation.
-     */
-    private EncodableFacet create(final Class<?> cls, final FacetHolder holder) {
-
-        // create from annotation, if present
-        final Encodable annotation = getAnnotation(cls, Encodable.class);
-        if (annotation != null) {
-            final EncodableFacetAnnotation facet = new EncodableFacetAnnotation(cls, getIsisConfiguration(), holder, adapterManager, dependencyInjector);
-            if (facet.isValid()) {
-                return facet;
-            }
-        }
-
-        // otherwise, try to create from configuration, if present
-        final String encoderDecoderName = EncoderDecoderUtil.encoderDecoderNameFromConfiguration(cls,
-                getIsisConfiguration());
-        if (!StringUtils.isNullOrEmpty(encoderDecoderName)) {
-            final EncodableFacetFromConfiguration facet = new EncodableFacetFromConfiguration(encoderDecoderName, holder, adapterManager, dependencyInjector);
-            if (facet.isValid()) {
-                return facet;
-            }
-        }
-
-        // otherwise, no value semantic
-        return null;
-    }
-
-	// ////////////////////////////////////////////////////////////////////
-    // Injected
-    // ////////////////////////////////////////////////////////////////////
-
-    public IsisConfiguration getIsisConfiguration() {
-        return configuration;
-    }
+    private DependencyInjector dependencyInjector;
+
+    public EncodableAnnotationFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContaxt) {
+        FacetUtil.addFacet(create(processClassContaxt.getCls(), processClassContaxt.getFacetHolder()));
+    }
+
+    /**
+     * Returns a {@link EncodableFacet} implementation.
+     */
+    private EncodableFacet create(final Class<?> cls, final FacetHolder holder) {
+
+        // create from annotation, if present
+        final Encodable annotation = getAnnotation(cls, Encodable.class);
+        if (annotation != null) {
+            final EncodableFacetAnnotation facet =
+                new EncodableFacetAnnotation(cls, getIsisConfiguration(), holder, adapterManager, dependencyInjector);
+            if (facet.isValid()) {
+                return facet;
+            }
+        }
+
+        // otherwise, try to create from configuration, if present
+        final String encoderDecoderName =
+            EncoderDecoderUtil.encoderDecoderNameFromConfiguration(cls, getIsisConfiguration());
+        if (!StringUtils.isNullOrEmpty(encoderDecoderName)) {
+            final EncodableFacetFromConfiguration facet =
+                new EncodableFacetFromConfiguration(encoderDecoderName, holder, adapterManager, dependencyInjector);
+            if (facet.isValid()) {
+                return facet;
+            }
+        }
+
+        // otherwise, no value semantic
+        return null;
+    }
+
+    // ////////////////////////////////////////////////////////////////////
+    // Injected
+    // ////////////////////////////////////////////////////////////////////
+
+    public IsisConfiguration getIsisConfiguration() {
+        return configuration;
+    }
+
     @Override
-    public void setIsisConfiguration(final IsisConfiguration configuration) {
-        this.configuration = configuration;
-    }
-
+    public void setIsisConfiguration(final IsisConfiguration configuration) {
+        this.configuration = configuration;
+    }
+
     @Override
-    public void setAdapterMap(AdapterMap adapterManager) {
+    public void setAdapterMap(final AdapterMap adapterManager) {
         this.adapterManager = adapterManager;
     }
-    
+
     @Override
-    public void setDependencyInjector(DependencyInjector dependencyInjector) {
+    public void setDependencyInjector(final DependencyInjector dependencyInjector) {
         this.dependencyInjector = dependencyInjector;
     }
-
-}
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableFacetAbstract.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableFacetAbstract.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.encodeable;
 
 import org.apache.isis.applib.adapters.EncoderDecoder;
@@ -29,7 +28,6 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet;
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjector;
 
-
 public abstract class EncodableFacetAbstract extends FacetAbstract implements EncodableFacet {
 
     private final Class<?> encoderDecoderClass;
@@ -37,31 +35,29 @@ public abstract class EncodableFacetAbst
     // to delegate to
     private final EncodableFacetUsingEncoderDecoder encodeableFacetUsingEncoderDecoder;
 
-    private AdapterMap adapterMap;
-    private DependencyInjector dependencyInjector;
+    private final AdapterMap adapterMap;
+    private final DependencyInjector dependencyInjector;
 
-    public EncodableFacetAbstract(
-            final String candidateEncoderDecoderName,
-            final Class<?> candidateEncoderDecoderClass,
-            final FacetHolder holder, 
-            final AdapterMap adapterManager,
-            final DependencyInjector dependencyInjector) {
+    public EncodableFacetAbstract(final String candidateEncoderDecoderName,
+        final Class<?> candidateEncoderDecoderClass, final FacetHolder holder, final AdapterMap adapterManager,
+        final DependencyInjector dependencyInjector) {
         super(EncodableFacet.class, holder, false);
         this.adapterMap = adapterManager;
         this.dependencyInjector = dependencyInjector;
 
-        this.encoderDecoderClass = EncoderDecoderUtil.encoderDecoderOrNull(candidateEncoderDecoderClass,
-                candidateEncoderDecoderName);
+        this.encoderDecoderClass =
+            EncoderDecoderUtil.encoderDecoderOrNull(candidateEncoderDecoderClass, candidateEncoderDecoderName);
         if (isValid()) {
-            EncoderDecoder encoderDecoder = 
+            final EncoderDecoder encoderDecoder =
                 (EncoderDecoder<?>) ClassUtil.newInstance(encoderDecoderClass, FacetHolder.class, holder);
-            this.encodeableFacetUsingEncoderDecoder = new EncodableFacetUsingEncoderDecoder(encoderDecoder, holder, getAdapterMap(), getDependencyInjector());
+            this.encodeableFacetUsingEncoderDecoder =
+                new EncodableFacetUsingEncoderDecoder(encoderDecoder, holder, getAdapterMap(), getDependencyInjector());
         } else {
             this.encodeableFacetUsingEncoderDecoder = null;
         }
     }
 
-	/**
+    /**
      * Discover whether either of the candidate encoder/decoder name or class is valid.
      */
     public boolean isValid() {
@@ -90,14 +86,12 @@ public abstract class EncodableFacetAbst
         return encodeableFacetUsingEncoderDecoder.toEncodedString(object);
     }
 
-
     public AdapterMap getAdapterMap() {
         return adapterMap;
     }
+
     public DependencyInjector getDependencyInjector() {
         return dependencyInjector;
     }
-    
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableFacetAnnotation.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableFacetAnnotation.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableFacetAnnotation.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableFacetAnnotation.java Tue Apr 26 22:03:43 2011
@@ -17,50 +17,41 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.encodeable;
 
-package org.apache.isis.core.progmodel.facets.object.encodeable;
-
 import org.apache.isis.applib.annotation.Encodable;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.lang.StringUtils;
 import org.apache.isis.core.metamodel.adapter.map.AdapterMap;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjector;
-
-
-public class EncodableFacetAnnotation extends EncodableFacetAbstract {
-
-    private static String encoderDecoderName(final Class<?> annotatedClass, final IsisConfiguration configuration) {
-        final Encodable annotation = annotatedClass.getAnnotation(Encodable.class);
-        final String encoderDecoderName = annotation.encoderDecoderName();
-        if (!StringUtils.isNullOrEmpty(encoderDecoderName)) {
-            return encoderDecoderName;
-        }
-        return EncoderDecoderUtil.encoderDecoderNameFromConfiguration(annotatedClass, configuration);
-    }
-
-    private static Class<?> encoderDecoderClass(final Class<?> annotatedClass) {
-        final Encodable annotation = annotatedClass.getAnnotation(Encodable.class);
-        return annotation.encoderDecoderClass();
-    }
-
-    public EncodableFacetAnnotation(
-            final Class<?> annotatedClass,
-            final IsisConfiguration configuration,
-            final FacetHolder holder, 
-            final AdapterMap adapterManager, 
-            final DependencyInjector dependencyInjector) {
-        this(encoderDecoderName(annotatedClass, configuration), encoderDecoderClass(annotatedClass), holder, adapterManager, dependencyInjector);
-    }
-
-    private EncodableFacetAnnotation(
-            final String candidateEncoderDecoderName,
-            final Class<?> candidateEncoderDecoderClass,
-            final FacetHolder holder, 
-            final AdapterMap adapterManager, 
-            final DependencyInjector dependencyInjector) {
-        super(candidateEncoderDecoderName, candidateEncoderDecoderClass, holder, adapterManager, dependencyInjector );
-    }
-
-}
-
+
+public class EncodableFacetAnnotation extends EncodableFacetAbstract {
+
+    private static String encoderDecoderName(final Class<?> annotatedClass, final IsisConfiguration configuration) {
+        final Encodable annotation = annotatedClass.getAnnotation(Encodable.class);
+        final String encoderDecoderName = annotation.encoderDecoderName();
+        if (!StringUtils.isNullOrEmpty(encoderDecoderName)) {
+            return encoderDecoderName;
+        }
+        return EncoderDecoderUtil.encoderDecoderNameFromConfiguration(annotatedClass, configuration);
+    }
+
+    private static Class<?> encoderDecoderClass(final Class<?> annotatedClass) {
+        final Encodable annotation = annotatedClass.getAnnotation(Encodable.class);
+        return annotation.encoderDecoderClass();
+    }
+
+    public EncodableFacetAnnotation(final Class<?> annotatedClass, final IsisConfiguration configuration,
+        final FacetHolder holder, final AdapterMap adapterManager, final DependencyInjector dependencyInjector) {
+        this(encoderDecoderName(annotatedClass, configuration), encoderDecoderClass(annotatedClass), holder,
+            adapterManager, dependencyInjector);
+    }
+
+    private EncodableFacetAnnotation(final String candidateEncoderDecoderName,
+        final Class<?> candidateEncoderDecoderClass, final FacetHolder holder, final AdapterMap adapterManager,
+        final DependencyInjector dependencyInjector) {
+        super(candidateEncoderDecoderName, candidateEncoderDecoderClass, holder, adapterManager, dependencyInjector);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableFacetFromConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableFacetFromConfiguration.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableFacetFromConfiguration.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableFacetFromConfiguration.java Tue Apr 26 22:03:43 2011
@@ -17,23 +17,17 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.encodeable;
 
-package org.apache.isis.core.progmodel.facets.object.encodeable;
-
 import org.apache.isis.core.metamodel.adapter.map.AdapterMap;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjector;
-
-
-public class EncodableFacetFromConfiguration extends EncodableFacetAbstract {
-
-    public EncodableFacetFromConfiguration(
-    		final String candidateEncoderDecoderName, 
-    		final FacetHolder holder, 
-    		final AdapterMap adapterManager, 
-    		final DependencyInjector dependencyInjector) {
-        super(candidateEncoderDecoderName, null, holder, adapterManager, dependencyInjector );
-
-    }
-}
-
+
+public class EncodableFacetFromConfiguration extends EncodableFacetAbstract {
+
+    public EncodableFacetFromConfiguration(final String candidateEncoderDecoderName, final FacetHolder holder,
+        final AdapterMap adapterManager, final DependencyInjector dependencyInjector) {
+        super(candidateEncoderDecoderName, null, holder, adapterManager, dependencyInjector);
+
+    }
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableFacetUsingEncoderDecoder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableFacetUsingEncoderDecoder.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableFacetUsingEncoderDecoder.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncodableFacetUsingEncoderDecoder.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.encodeable;
 
 import org.apache.isis.applib.adapters.EncoderDecoder;
@@ -29,18 +28,14 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet;
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjector;
 
-
 public class EncodableFacetUsingEncoderDecoder extends FacetAbstract implements EncodableFacet {
 
     private final EncoderDecoder encoderDecoder;
     private final DependencyInjector dependencyInjector;
     private final AdapterMap adapterManager;
 
-    public EncodableFacetUsingEncoderDecoder(
-    		final EncoderDecoder encoderDecoder, 
-    		final FacetHolder holder,
-    		final AdapterMap adapterManager,
-    		final DependencyInjector dependencyInjector) {
+    public EncodableFacetUsingEncoderDecoder(final EncoderDecoder encoderDecoder, final FacetHolder holder,
+        final AdapterMap adapterManager, final DependencyInjector dependencyInjector) {
         super(EncodableFacet.class, holder, false);
         this.encoderDecoder = encoderDecoder;
         this.dependencyInjector = dependencyInjector;
@@ -52,7 +47,7 @@ public class EncodableFacetUsingEncoderD
 
     @Override
     protected String toStringValues() {
-    	getDependencyInjector().injectDependenciesInto(encoderDecoder);
+        getDependencyInjector().injectDependenciesInto(encoderDecoder);
         return encoderDecoder.toString();
     }
 
@@ -62,25 +57,22 @@ public class EncodableFacetUsingEncoderD
         if (ENCODED_NULL.equals(encodedData)) {
             return null;
         } else {
-        	getDependencyInjector().injectDependenciesInto(encoderDecoder);
-            Object decodedObject = encoderDecoder.fromEncodedString(encodedData);
-			return getAdapterManager().adapterFor(decodedObject);
+            getDependencyInjector().injectDependenciesInto(encoderDecoder);
+            final Object decodedObject = encoderDecoder.fromEncodedString(encodedData);
+            return getAdapterManager().adapterFor(decodedObject);
         }
 
     }
 
     @Override
     public String toEncodedString(final ObjectAdapter object) {
-    	getDependencyInjector().injectDependenciesInto(encoderDecoder);
+        getDependencyInjector().injectDependenciesInto(encoderDecoder);
         return object == null ? ENCODED_NULL : encoderDecoder.toEncodedString(object.getObject());
     }
 
-
-    
-    ////////////////////////////////////////////////////////
+    // //////////////////////////////////////////////////////
     // Dependencies (from constructor)
-    ////////////////////////////////////////////////////////
-    
+    // //////////////////////////////////////////////////////
 
     public DependencyInjector getDependencyInjector() {
         return dependencyInjector;
@@ -89,6 +81,5 @@ public class EncodableFacetUsingEncoderD
     public AdapterMap getAdapterManager() {
         return adapterManager;
     }
-    
-}
 
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncoderDecoderUtil.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncoderDecoderUtil.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncoderDecoderUtil.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/encodeable/EncoderDecoderUtil.java Tue Apr 26 22:03:43 2011
@@ -17,34 +17,34 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.encodeable;
 
-package org.apache.isis.core.progmodel.facets.object.encodeable;
-
 import org.apache.isis.applib.adapters.EncoderDecoder;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.lang.JavaClassUtils;
 import org.apache.isis.core.commons.lang.StringUtils;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-
-
-public final class EncoderDecoderUtil {
-
-    private EncoderDecoderUtil() {}
-
-    public static final String ENCODER_DECODER_NAME_KEY_PREFIX = "isis.reflector.java.facets.encoderDecoder.";
-    public static final String ENCODER_DECODER_NAME_KEY_SUFFIX = ".encoderDecoderName";
-
-    static String encoderDecoderNameFromConfiguration(final Class<?> type, final IsisConfiguration configuration) {
-        final String key = ENCODER_DECODER_NAME_KEY_PREFIX + type.getCanonicalName() + ENCODER_DECODER_NAME_KEY_SUFFIX;
-        final String encoderDecoderName = configuration.getString(key);
-        return !StringUtils.isNullOrEmpty(encoderDecoderName) ? encoderDecoderName : null;
-    }
-
-    public static Class<?> encoderDecoderOrNull(final Class<?> candidateClass, final String classCandidateName) {
-        final Class<?> type = candidateClass != null ? JavaClassUtils.implementingClassOrNull(candidateClass.getName(),
-                EncoderDecoder.class, FacetHolder.class) : null;
-        return type != null ? type : JavaClassUtils.implementingClassOrNull(classCandidateName, EncoderDecoder.class, FacetHolder.class);
-    }
-
-}
-
+
+public final class EncoderDecoderUtil {
+
+    private EncoderDecoderUtil() {
+    }
+
+    public static final String ENCODER_DECODER_NAME_KEY_PREFIX = "isis.reflector.java.facets.encoderDecoder.";
+    public static final String ENCODER_DECODER_NAME_KEY_SUFFIX = ".encoderDecoderName";
+
+    static String encoderDecoderNameFromConfiguration(final Class<?> type, final IsisConfiguration configuration) {
+        final String key = ENCODER_DECODER_NAME_KEY_PREFIX + type.getCanonicalName() + ENCODER_DECODER_NAME_KEY_SUFFIX;
+        final String encoderDecoderName = configuration.getString(key);
+        return !StringUtils.isNullOrEmpty(encoderDecoderName) ? encoderDecoderName : null;
+    }
+
+    public static Class<?> encoderDecoderOrNull(final Class<?> candidateClass, final String classCandidateName) {
+        final Class<?> type =
+            candidateClass != null ? JavaClassUtils.implementingClassOrNull(candidateClass.getName(),
+                EncoderDecoder.class, FacetHolder.class) : null;
+        return type != null ? type : JavaClassUtils.implementingClassOrNull(classCandidateName, EncoderDecoder.class,
+            FacetHolder.class);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/facets/FacetsFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/facets/FacetsFacetAbstract.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/facets/FacetsFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/facets/FacetsFacetAbstract.java Tue Apr 26 22:03:43 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.facets;
 
-package org.apache.isis.core.progmodel.facets.object.facets;
-
 import java.util.ArrayList;
 import java.util.List;
 
@@ -30,63 +29,62 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.FacetFactory;
 import org.apache.isis.core.metamodel.facets.facets.FacetsFacet;
-
-
-public abstract class FacetsFacetAbstract extends FacetAbstract implements FacetsFacet {
-
-    public static Class<? extends Facet> type() {
-        return FacetsFacet.class;
-    }
-
-    private final Class<? extends FacetFactory>[] facetFactories;
-
-	public FacetsFacetAbstract(final String[] names, final Class<?>[] classes, final FacetHolder holder) {
-        super(type(), holder, false);
-        final List<Class<? extends FacetFactory>> facetFactories = new ArrayList<Class<? extends FacetFactory>>();
-        for (int i = 0; i < names.length; i++) {
-            final Class<? extends FacetFactory> facetFactory = facetFactoryOrNull(names[i]);
-            if (facetFactory != null) {
-                facetFactories.add(facetFactory);
-            }
-        }
-        for (int i = 0; i < classes.length; i++) {
-            final Class<? extends FacetFactory> facetFactory = facetFactoryOrNull(classes[i]);
-            if (facetFactory != null) {
-                facetFactories.add(facetFactory);
-            }
-        }
-        this.facetFactories = asArray(facetFactories);
-    }
-
-	@SuppressWarnings("unchecked")
-	private Class<? extends FacetFactory>[] asArray(
-			final List<Class<? extends FacetFactory>> facetFactories) {
-		return (Class<? extends FacetFactory>[]) facetFactories.toArray(new Class[] {});
-	}
-
-    public Class<? extends FacetFactory>[] facetFactories() {
-        return facetFactories;
-    }
-
-    private Class<? extends FacetFactory> facetFactoryOrNull(final String classCandidateName) {
-        if (classCandidateName == null) {
-            return null;
-        }
-        Class<?> classCandidate = null;
-        try {
-        	classCandidate = InstanceUtil.loadClass(classCandidateName);
-            return facetFactoryOrNull(classCandidate);
-        } catch (final IsisException ex) {
-            return null;
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-	private Class<? extends FacetFactory> facetFactoryOrNull(final Class classCandidate) {
-        if (classCandidate == null) {
-            return null;
-        }
-        return FacetFactory.class.isAssignableFrom(classCandidate) ? classCandidate : null;
-    }
-
-}
+
+public abstract class FacetsFacetAbstract extends FacetAbstract implements FacetsFacet {
+
+    public static Class<? extends Facet> type() {
+        return FacetsFacet.class;
+    }
+
+    private final Class<? extends FacetFactory>[] facetFactories;
+
+    public FacetsFacetAbstract(final String[] names, final Class<?>[] classes, final FacetHolder holder) {
+        super(type(), holder, false);
+        final List<Class<? extends FacetFactory>> facetFactories = new ArrayList<Class<? extends FacetFactory>>();
+        for (final String name : names) {
+            final Class<? extends FacetFactory> facetFactory = facetFactoryOrNull(name);
+            if (facetFactory != null) {
+                facetFactories.add(facetFactory);
+            }
+        }
+        for (final Class<?> classe : classes) {
+            final Class<? extends FacetFactory> facetFactory = facetFactoryOrNull(classe);
+            if (facetFactory != null) {
+                facetFactories.add(facetFactory);
+            }
+        }
+        this.facetFactories = asArray(facetFactories);
+    }
+
+    @SuppressWarnings("unchecked")
+    private Class<? extends FacetFactory>[] asArray(final List<Class<? extends FacetFactory>> facetFactories) {
+        return facetFactories.toArray(new Class[] {});
+    }
+
+    @Override
+    public Class<? extends FacetFactory>[] facetFactories() {
+        return facetFactories;
+    }
+
+    private Class<? extends FacetFactory> facetFactoryOrNull(final String classCandidateName) {
+        if (classCandidateName == null) {
+            return null;
+        }
+        Class<?> classCandidate = null;
+        try {
+            classCandidate = InstanceUtil.loadClass(classCandidateName);
+            return facetFactoryOrNull(classCandidate);
+        } catch (final IsisException ex) {
+            return null;
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    private Class<? extends FacetFactory> facetFactoryOrNull(final Class classCandidate) {
+        if (classCandidate == null) {
+            return null;
+        }
+        return FacetFactory.class.isAssignableFrom(classCandidate) ? classCandidate : null;
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/facets/annotation/FacetsAnnotationFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/facets/annotation/FacetsAnnotationFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/facets/annotation/FacetsAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/facets/annotation/FacetsAnnotationFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,39 +17,37 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.facets.annotation;
 
-package org.apache.isis.core.progmodel.facets.object.facets.annotation;
-
 import org.apache.isis.applib.annotation.Facets;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetUtil;
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facets.AnnotationBasedFacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.facets.FacetsFacet;
-
-
-public class FacetsAnnotationFacetFactory extends AnnotationBasedFacetFactoryAbstract {
-
-    public FacetsAnnotationFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContaxt) {
-        final Facets annotation = getAnnotation(processClassContaxt.getCls(), Facets.class);
-        FacetUtil.addFacet(create(annotation, processClassContaxt.getFacetHolder()));
-    }
-
-    /**
-     * Returns a {@link FacetsFacet} impl provided that at least one valid
-     * {@link FacetsFacet#facetFactories() factory} was specified.
-     */
-    private FacetsFacet create(final Facets annotation, final FacetHolder holder) {
-        if (annotation == null) {
-            return null;
-        }
-        final FacetsFacetAnnotation facetsFacetAnnotation = new FacetsFacetAnnotation(annotation, holder);
-        return facetsFacetAnnotation.facetFactories().length > 0 ? facetsFacetAnnotation : null;
-    }
-
-}
+
+public class FacetsAnnotationFacetFactory extends AnnotationBasedFacetFactoryAbstract {
+
+    public FacetsAnnotationFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContaxt) {
+        final Facets annotation = getAnnotation(processClassContaxt.getCls(), Facets.class);
+        FacetUtil.addFacet(create(annotation, processClassContaxt.getFacetHolder()));
+    }
+
+    /**
+     * Returns a {@link FacetsFacet} impl provided that at least one valid {@link FacetsFacet#facetFactories() factory}
+     * was specified.
+     */
+    private FacetsFacet create(final Facets annotation, final FacetHolder holder) {
+        if (annotation == null) {
+            return null;
+        }
+        final FacetsFacetAnnotation facetsFacetAnnotation = new FacetsFacetAnnotation(annotation, holder);
+        return facetsFacetAnnotation.facetFactories().length > 0 ? facetsFacetAnnotation : null;
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/facets/annotation/FacetsFacetAnnotation.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/facets/annotation/FacetsFacetAnnotation.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/facets/annotation/FacetsFacetAnnotation.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/facets/annotation/FacetsFacetAnnotation.java Tue Apr 26 22:03:43 2011
@@ -17,19 +17,16 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.facets.annotation;
 
-package org.apache.isis.core.progmodel.facets.object.facets.annotation;
-
 import org.apache.isis.applib.annotation.Facets;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.progmodel.facets.object.facets.FacetsFacetAbstract;
-
-
-public class FacetsFacetAnnotation extends FacetsFacetAbstract {
-
-    public FacetsFacetAnnotation(final Facets annotation, final FacetHolder holder) {
-        super(annotation.facetFactoryNames(), annotation.facetFactoryClasses(), holder);
-    }
-
-}
-
+
+public class FacetsFacetAnnotation extends FacetsFacetAbstract {
+
+    public FacetsFacetAnnotation(final Facets annotation, final FacetHolder holder) {
+        super(annotation.facetFactoryNames(), annotation.facetFactoryClasses(), holder);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/HiddenAnnotationForTypeFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/HiddenAnnotationForTypeFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/HiddenAnnotationForTypeFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/HiddenAnnotationForTypeFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,9 +17,7 @@
  *  under the License.
  */
 
-
-package org.apache.isis.core.progmodel.facets.object.hidden;
-
+package org.apache.isis.core.progmodel.facets.object.hidden;
 
 import org.apache.isis.applib.annotation.Hidden;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
@@ -28,22 +26,21 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.AnnotationBasedFacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.When;
 import org.apache.isis.core.metamodel.facets.hide.HiddenFacet;
-
-
-public class HiddenAnnotationForTypeFacetFactory extends AnnotationBasedFacetFactoryAbstract {
-
-    public HiddenAnnotationForTypeFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContaxt) {
-        final Hidden annotation = getAnnotation(processClassContaxt.getCls(), Hidden.class);
-        FacetUtil.addFacet(create(annotation, processClassContaxt.getFacetHolder()));
-    }
-
-    private static HiddenFacet create(final Hidden annotation, final FacetHolder holder) {
-        return annotation == null ? null : new HiddenFacetForTypeAnnotation(When.decode(annotation.value()), holder);
-    }
-
-}
+
+public class HiddenAnnotationForTypeFacetFactory extends AnnotationBasedFacetFactoryAbstract {
+
+    public HiddenAnnotationForTypeFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContaxt) {
+        final Hidden annotation = getAnnotation(processClassContaxt.getCls(), Hidden.class);
+        FacetUtil.addFacet(create(annotation, processClassContaxt.getFacetHolder()));
+    }
+
+    private static HiddenFacet create(final Hidden annotation, final FacetHolder holder) {
+        return annotation == null ? null : new HiddenFacetForTypeAnnotation(When.decode(annotation.value()), holder);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/HiddenFacetForTypeAnnotation.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/HiddenFacetForTypeAnnotation.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/HiddenFacetForTypeAnnotation.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/HiddenFacetForTypeAnnotation.java Tue Apr 26 22:03:43 2011
@@ -17,19 +17,16 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.hidden;
 
-package org.apache.isis.core.progmodel.facets.object.hidden;
-
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.When;
 import org.apache.isis.core.progmodel.facets.members.hide.HiddenFacetImpl;
-
-
-public class HiddenFacetForTypeAnnotation extends HiddenFacetImpl {
-
-    public HiddenFacetForTypeAnnotation(final When value, final FacetHolder holder) {
-        super(value, holder);
-    }
-
-}
-
+
+public class HiddenFacetForTypeAnnotation extends HiddenFacetImpl {
+
+    public HiddenFacetForTypeAnnotation(final When value, final FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/icon/method/IconFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/icon/method/IconFacetViaMethod.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/icon/method/IconFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/icon/method/IconFacetViaMethod.java Tue Apr 26 22:03:43 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.progmodel.facets.object.icon.method;
 
 import java.lang.reflect.Method;
@@ -27,7 +26,6 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.icon.IconFacetAbstract;
 
-
 public class IconFacetViaMethod extends IconFacetAbstract {
 
     private final Method method;
@@ -37,13 +35,13 @@ public class IconFacetViaMethod extends 
         this.method = method;
     }
 
+    @Override
     public String iconName(final ObjectAdapter owningAdapter) {
         try {
-			return (String) AdapterInvokeUtils.invoke(method, owningAdapter);
-		} catch (RuntimeException ex) {
-			return null;
-		}
+            return (String) AdapterInvokeUtils.invoke(method, owningAdapter);
+        } catch (final RuntimeException ex) {
+            return null;
+        }
     }
 
 }
-

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/icon/method/IconMethodFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/icon/method/IconMethodFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/icon/method/IconMethodFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/icon/method/IconMethodFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.icon.method;
 
-package org.apache.isis.core.progmodel.facets.object.icon.method;
-
 import java.lang.reflect.Method;
 
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
@@ -28,28 +27,28 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.methodutils.MethodScope;
 import org.apache.isis.core.progmodel.facets.MethodFinderUtils;
 import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
-
-
-public class IconMethodFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
-
-    private static final String ICON_NAME_PREFIX = "iconName";
-
-    private static final String[] PREFIXES = { ICON_NAME_PREFIX, };
-
-    public IconMethodFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY, PREFIXES);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContext) {
+
+public class IconMethodFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
+
+    private static final String ICON_NAME_PREFIX = "iconName";
+
+    private static final String[] PREFIXES = { ICON_NAME_PREFIX, };
+
+    public IconMethodFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY, PREFIXES);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
         final Class<?> cls = processClassContext.getCls();
         final FacetHolder facetHolder = processClassContext.getFacetHolder();
-
-        final Method method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, ICON_NAME_PREFIX, String.class, NO_PARAMETERS_TYPES);
-        if (method == null) {
-            return;
-        }
-        processClassContext.removeMethod(method);
-        FacetUtil.addFacet(new IconFacetViaMethod(method, facetHolder));
-    }
-}
+
+        final Method method =
+            MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, ICON_NAME_PREFIX, String.class, NO_PARAMETERS_TYPES);
+        if (method == null) {
+            return;
+        }
+        processClassContext.removeMethod(method);
+        FacetUtil.addFacet(new IconFacetViaMethod(method, facetHolder));
+    }
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/annotation/RemoveIgnoreAnnotationMethodsFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/annotation/RemoveIgnoreAnnotationMethodsFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/annotation/RemoveIgnoreAnnotationMethodsFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/annotation/RemoveIgnoreAnnotationMethodsFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,41 +17,38 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.ignore.annotation;
 
-package org.apache.isis.core.progmodel.facets.object.ignore.annotation;
-
 import java.lang.reflect.Method;
 
 import org.apache.isis.applib.annotation.Ignore;
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facetapi.MethodRemover;
 import org.apache.isis.core.metamodel.facets.AnnotationBasedFacetFactoryAbstract;
-
-
-public class RemoveIgnoreAnnotationMethodsFacetFactory extends AnnotationBasedFacetFactoryAbstract {
-
-    public RemoveIgnoreAnnotationMethodsFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContext) {
-        removeIgnoredMethods(processClassContext.getCls(), processClassContext);
-    }
-
-    private void removeIgnoredMethods(final Class<?> cls, final MethodRemover methodRemover) {
-        if (cls == null) {
-            return;
-        }
-
-        final Method[] methods = cls.getMethods();
-        for (int j = 0; j < methods.length; j++) {
-            final Method method = methods[j];
-            final Ignore annotation = getAnnotation(method, Ignore.class);
-            if (annotation != null) {
-                methodRemover.removeMethod(method);
-            }
-        }
-    }
-
-}
+
+public class RemoveIgnoreAnnotationMethodsFacetFactory extends AnnotationBasedFacetFactoryAbstract {
+
+    public RemoveIgnoreAnnotationMethodsFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
+        removeIgnoredMethods(processClassContext.getCls(), processClassContext);
+    }
+
+    private void removeIgnoredMethods(final Class<?> cls, final MethodRemover methodRemover) {
+        if (cls == null) {
+            return;
+        }
+
+        final Method[] methods = cls.getMethods();
+        for (final Method method : methods) {
+            final Ignore annotation = getAnnotation(method, Ignore.class);
+            if (annotation != null) {
+                methodRemover.removeMethod(method);
+            }
+        }
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/isis/RemoveSetDomainObjectContainerMethodFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/isis/RemoveSetDomainObjectContainerMethodFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/isis/RemoveSetDomainObjectContainerMethodFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/isis/RemoveSetDomainObjectContainerMethodFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,29 +17,28 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.ignore.isis;
 
-package org.apache.isis.core.progmodel.facets.object.ignore.isis;
-
 import org.apache.isis.applib.DomainObjectContainer;
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.methodutils.MethodScope;
-
-
-/**
- * Removes any calls to <tt>setContainer(DomainObjectContainer)</tt>.
- */
-public class RemoveSetDomainObjectContainerMethodFacetFactory extends FacetFactoryAbstract {
-
-    public RemoveSetDomainObjectContainerMethodFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContext) {
-        processClassContext.removeMethod(MethodScope.OBJECT, "setContainer", void.class, new Class[] { DomainObjectContainer.class });
-        processClassContext.removeMethod(MethodScope.OBJECT, "set_Container", void.class, new Class[] { DomainObjectContainer.class });
-    }
-
-}
-
+
+/**
+ * Removes any calls to <tt>setContainer(DomainObjectContainer)</tt>.
+ */
+public class RemoveSetDomainObjectContainerMethodFacetFactory extends FacetFactoryAbstract {
+
+    public RemoveSetDomainObjectContainerMethodFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
+        processClassContext.removeMethod(MethodScope.OBJECT, "setContainer", void.class,
+            new Class[] { DomainObjectContainer.class });
+        processClassContext.removeMethod(MethodScope.OBJECT, "set_Container", void.class,
+            new Class[] { DomainObjectContainer.class });
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/isis/RemoveStaticGettersAndSettersFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/isis/RemoveStaticGettersAndSettersFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/isis/RemoveStaticGettersAndSettersFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/isis/RemoveStaticGettersAndSettersFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,28 +17,25 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.ignore.isis;
 
-package org.apache.isis.core.progmodel.facets.object.ignore.isis;
-
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.methodutils.MethodScope;
-
-
-/**
- * Removes any static getter or setter methods.
- */
-public class RemoveStaticGettersAndSettersFacetFactory extends FacetFactoryAbstract {
-
-    public RemoveStaticGettersAndSettersFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContext) {
-        processClassContext.removeMethods(MethodScope.CLASS, "get", null, false, 0);
-        processClassContext.removeMethods(MethodScope.CLASS, "set", null, false, 0);
-    }
-
-}
-
+
+/**
+ * Removes any static getter or setter methods.
+ */
+public class RemoveStaticGettersAndSettersFacetFactory extends FacetFactoryAbstract {
+
+    public RemoveStaticGettersAndSettersFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
+        processClassContext.removeMethods(MethodScope.CLASS, "get", null, false, 0);
+        processClassContext.removeMethods(MethodScope.CLASS, "set", null, false, 0);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/IteratorFilteringFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/IteratorFilteringFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/IteratorFilteringFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/IteratorFilteringFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.ignore.javalang;
 
-package org.apache.isis.core.progmodel.facets.object.ignore.javalang;
-
 import java.lang.reflect.Method;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
@@ -27,32 +26,30 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.MethodFilteringFacetFactory;
 import org.apache.isis.core.metamodel.methodutils.MethodScope;
-
-
-/**
- * Designed to simply filter out {@link Iterable#iterator()} method if it exists.
- * 
- * <p>
- * Does not add any {@link Facet}s.
- */
-public class IteratorFilteringFacetFactory extends FacetFactoryAbstract implements MethodFilteringFacetFactory {
-
-    public IteratorFilteringFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContaxt) {
-        processClassContaxt.removeMethod(MethodScope.OBJECT, "iterator", java.util.Iterator.class, new Class[] {});
-    }
-
+
+/**
+ * Designed to simply filter out {@link Iterable#iterator()} method if it exists.
+ * 
+ * <p>
+ * Does not add any {@link Facet}s.
+ */
+public class IteratorFilteringFacetFactory extends FacetFactoryAbstract implements MethodFilteringFacetFactory {
+
+    public IteratorFilteringFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
     @Override
-    public boolean recognizes(final Method method) {
-        if (method.toString().equals("public abstract java.util.Iterator java.lang.Iterable.iterator()")) {
-            return true;
-        }
-        return false;
-    }
-
-}
-
+    public void process(final ProcessClassContext processClassContaxt) {
+        processClassContaxt.removeMethod(MethodScope.OBJECT, "iterator", java.util.Iterator.class, new Class[] {});
+    }
+
+    @Override
+    public boolean recognizes(final Method method) {
+        if (method.toString().equals("public abstract java.util.Iterator java.lang.Iterable.iterator()")) {
+            return true;
+        }
+        return false;
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/RemoveGetClassMethodFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/RemoveGetClassMethodFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/RemoveGetClassMethodFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/RemoveGetClassMethodFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,30 +17,27 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.ignore.javalang;
 
-package org.apache.isis.core.progmodel.facets.object.ignore.javalang;
-
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.methodutils.MethodScope;
-
-
-/**
- * Removes any static getter or setter methods.
- * 
- * <p>
- * TODO: this is probably redundant given we also have {@link RemoveJavaLangObjectMethodsFacetFactory}.
- */
-public class RemoveGetClassMethodFacetFactory extends FacetFactoryAbstract {
-
-    public RemoveGetClassMethodFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContext) {
-        processClassContext.removeMethod(MethodScope.OBJECT, "getClass", Class.class, null);
-    }
-
-}
-
+
+/**
+ * Removes any static getter or setter methods.
+ * 
+ * <p>
+ * TODO: this is probably redundant given we also have {@link RemoveJavaLangObjectMethodsFacetFactory}.
+ */
+public class RemoveGetClassMethodFacetFactory extends FacetFactoryAbstract {
+
+    public RemoveGetClassMethodFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
+        processClassContext.removeMethod(MethodScope.OBJECT, "getClass", Class.class, null);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/RemoveInitMethodFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/RemoveInitMethodFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/RemoveInitMethodFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/RemoveInitMethodFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,27 +17,24 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.ignore.javalang;
 
-package org.apache.isis.core.progmodel.facets.object.ignore.javalang;
-
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.methodutils.MethodScope;
-
-
-/**
- * Removes any calls to <tt>init</tt>.
- */
-public class RemoveInitMethodFacetFactory extends FacetFactoryAbstract {
-
-    public RemoveInitMethodFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContext) {
-        processClassContext.removeMethod(MethodScope.OBJECT, "init", void.class, new Class[0]);
-    }
-
-}
-
+
+/**
+ * Removes any calls to <tt>init</tt>.
+ */
+public class RemoveInitMethodFacetFactory extends FacetFactoryAbstract {
+
+    public RemoveInitMethodFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
+        processClassContext.removeMethod(MethodScope.OBJECT, "init", void.class, new Class[0]);
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/RemoveJavaLangObjectMethodsFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/RemoveJavaLangObjectMethodsFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/RemoveJavaLangObjectMethodsFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/RemoveJavaLangObjectMethodsFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,50 +17,47 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.ignore.javalang;
 
-package org.apache.isis.core.progmodel.facets.object.ignore.javalang;
-
 import java.lang.reflect.Method;
 
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.methodutils.MethodScope;
-
-
-/**
- * Removes all methods inherited from {@link Object}.
- */
-public class RemoveJavaLangObjectMethodsFacetFactory extends FacetFactoryAbstract {
-
-    public RemoveJavaLangObjectMethodsFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    private static final String[] objectMethodNames;
-    private static final Class<?>[] objectMethodReturnTypes;
-    private static final Class<?>[][] objectMethodParameters;
-
-    static {
-        final Method[] methods = Object.class.getMethods();
-        final int size = methods.length;
-        objectMethodNames = new String[size];
-        objectMethodReturnTypes = new Class[size];
-        objectMethodParameters = new Class[size][];
-        for (int i = 0; i < methods.length; i++) {
-            final Method method = methods[i];
-            objectMethodNames[i] = method.getName();
-            objectMethodReturnTypes[i] = method.getReturnType();
-            objectMethodParameters[i] = method.getParameterTypes();
-        }
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContext) {
-        final Method[] methods = Object.class.getMethods();
-        for (int i = 0; i < methods.length; i++) {
-            processClassContext.removeMethod(MethodScope.OBJECT, objectMethodNames[i], null, objectMethodParameters[i]);
-        }
-    }
-
-}
-
+
+/**
+ * Removes all methods inherited from {@link Object}.
+ */
+public class RemoveJavaLangObjectMethodsFacetFactory extends FacetFactoryAbstract {
+
+    public RemoveJavaLangObjectMethodsFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
+    private static final String[] objectMethodNames;
+    private static final Class<?>[] objectMethodReturnTypes;
+    private static final Class<?>[][] objectMethodParameters;
+
+    static {
+        final Method[] methods = Object.class.getMethods();
+        final int size = methods.length;
+        objectMethodNames = new String[size];
+        objectMethodReturnTypes = new Class[size];
+        objectMethodParameters = new Class[size][];
+        for (int i = 0; i < methods.length; i++) {
+            final Method method = methods[i];
+            objectMethodNames[i] = method.getName();
+            objectMethodReturnTypes[i] = method.getReturnType();
+            objectMethodParameters[i] = method.getParameterTypes();
+        }
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
+        final Method[] methods = Object.class.getMethods();
+        for (int i = 0; i < methods.length; i++) {
+            processClassContext.removeMethod(MethodScope.OBJECT, objectMethodNames[i], null, objectMethodParameters[i]);
+        }
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/RemoveSuperclassMethodsFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/RemoveSuperclassMethodsFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/RemoveSuperclassMethodsFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/RemoveSuperclassMethodsFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.ignore.javalang;
 
-package org.apache.isis.core.progmodel.facets.object.ignore.javalang;
-
 import java.lang.reflect.Method;
 
 import org.apache.isis.core.commons.lang.JavaClassUtils;
@@ -27,42 +26,39 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facetapi.MethodRemover;
 import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
-
-
-/**
- * Removes all superclass methods of the class, but doesn't add any {@link Facet}s.
- */
-public class RemoveSuperclassMethodsFacetFactory extends FacetFactoryAbstract {
-
-    @SuppressWarnings("unused")
-	private static final String JAVA_CLASS_PREFIX = "java.";
-
-    public RemoveSuperclassMethodsFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContext) {
-        removeSuperclassMethods(processClassContext.getCls(), processClassContext);
-    }
-
-    private void removeSuperclassMethods(final Class<?> type, final MethodRemover methodRemover) {
-        if (type == null) {
-            return;
-        }
-
-        if (!JavaClassUtils.isJavaClass(type)) {
-            removeSuperclassMethods(type.getSuperclass(), methodRemover);
-            return;
-        }
-
-        final Method[] methods = type.getMethods();
-        for (int j = 0; j < methods.length; j++) {
-            final Method method = methods[j];
-            methodRemover.removeMethod(method);
-        }
-
-    }
-
-}
-
+
+/**
+ * Removes all superclass methods of the class, but doesn't add any {@link Facet}s.
+ */
+public class RemoveSuperclassMethodsFacetFactory extends FacetFactoryAbstract {
+
+    @SuppressWarnings("unused")
+    private static final String JAVA_CLASS_PREFIX = "java.";
+
+    public RemoveSuperclassMethodsFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
+        removeSuperclassMethods(processClassContext.getCls(), processClassContext);
+    }
+
+    private void removeSuperclassMethods(final Class<?> type, final MethodRemover methodRemover) {
+        if (type == null) {
+            return;
+        }
+
+        if (!JavaClassUtils.isJavaClass(type)) {
+            removeSuperclassMethods(type.getSuperclass(), methodRemover);
+            return;
+        }
+
+        final Method[] methods = type.getMethods();
+        for (final Method method : methods) {
+            methodRemover.removeMethod(method);
+        }
+
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/SyntheticMethodFilteringFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/SyntheticMethodFilteringFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/SyntheticMethodFilteringFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/SyntheticMethodFilteringFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.progmodel.facets.object.ignore.javalang;
 
-package org.apache.isis.core.progmodel.facets.object.ignore.javalang;
-
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 
@@ -28,38 +27,37 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.MethodFilteringFacetFactory;
-
-
-/**
- * Designed to simply filter out any synthetic methods.
- * 
- * <p>
- * Does not add any {@link Facet}s.
- */
-public class SyntheticMethodFilteringFacetFactory extends FacetFactoryAbstract implements MethodFilteringFacetFactory {
-
-    public SyntheticMethodFilteringFacetFactory() {
-        super(new ArrayList<FeatureType>());
-    }
-
+
+/**
+ * Designed to simply filter out any synthetic methods.
+ * 
+ * <p>
+ * Does not add any {@link Facet}s.
+ */
+public class SyntheticMethodFilteringFacetFactory extends FacetFactoryAbstract implements MethodFilteringFacetFactory {
+
+    public SyntheticMethodFilteringFacetFactory() {
+        super(new ArrayList<FeatureType>());
+    }
+
     @Override
-    public boolean recognizes(final Method method) {
-        return isSynthetic(method);
-    }
-
-    private boolean isSynthetic(final Method method) {
-        try {
-            final Class<?> type = method.getClass();
-            try {
-                return ((Boolean) type.getMethod("isSynthetic", (Class[]) null).invoke(method, (Object[]) null)).booleanValue();
-            } catch (final NoSuchMethodException nsm) {
-                // pre java 5
-                return false;
-            }
-        } catch (final Exception e) {
-            throw new IsisException(e);
-        }
-    }
-
-}
-
+    public boolean recognizes(final Method method) {
+        return isSynthetic(method);
+    }
+
+    private boolean isSynthetic(final Method method) {
+        try {
+            final Class<?> type = method.getClass();
+            try {
+                return ((Boolean) type.getMethod("isSynthetic", (Class[]) null).invoke(method, (Object[]) null))
+                    .booleanValue();
+            } catch (final NoSuchMethodException nsm) {
+                // pre java 5
+                return false;
+            }
+        } catch (final Exception e) {
+            throw new IsisException(e);
+        }
+    }
+
+}

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/immutable/annotation/ImmutableAnnotationFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/immutable/annotation/ImmutableAnnotationFacetFactory.java?rev=1096928&r1=1096927&r2=1096928&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/immutable/annotation/ImmutableAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/immutable/annotation/ImmutableAnnotationFacetFactory.java Tue Apr 26 22:03:43 2011
@@ -17,9 +17,7 @@
  *  under the License.
  */
 
-
-package org.apache.isis.core.progmodel.facets.object.immutable.annotation;
-
+package org.apache.isis.core.progmodel.facets.object.immutable.annotation;
 
 import org.apache.isis.applib.annotation.Immutable;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
@@ -28,23 +26,21 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.AnnotationBasedFacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.When;
 import org.apache.isis.core.metamodel.facets.object.immutable.ImmutableFacet;
-
-
-public class ImmutableAnnotationFacetFactory extends AnnotationBasedFacetFactoryAbstract {
-
-    public ImmutableAnnotationFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContaxt) {
-        final Immutable annotation = getAnnotation(processClassContaxt.getCls(), Immutable.class);
-        FacetUtil.addFacet(create(annotation, processClassContaxt.getFacetHolder()));
-    }
-
-    private ImmutableFacet create(final Immutable annotation, final FacetHolder holder) {
-        return annotation == null ? null : new ImmutableFacetAnnotation(When.decode(annotation.value()), holder);
-    }
-
-
-}
+
+public class ImmutableAnnotationFacetFactory extends AnnotationBasedFacetFactoryAbstract {
+
+    public ImmutableAnnotationFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContaxt) {
+        final Immutable annotation = getAnnotation(processClassContaxt.getCls(), Immutable.class);
+        FacetUtil.addFacet(create(annotation, processClassContaxt.getFacetHolder()));
+    }
+
+    private ImmutableFacet create(final Immutable annotation, final FacetHolder holder) {
+        return annotation == null ? null : new ImmutableFacetAnnotation(When.decode(annotation.value()), holder);
+    }
+
+}



Mime
View raw message