org.apache.commons.betwixt.strategy.impl
Class OverrideCollectiveTypeStategy

java.lang.Object
  extended by org.apache.commons.betwixt.strategy.CollectiveTypeStrategy
      extended by org.apache.commons.betwixt.strategy.impl.OverrideCollectiveTypeStategy

public class OverrideCollectiveTypeStategy
extends CollectiveTypeStrategy

Strategy that allows specific classes to be marked as collective (overrideCollective(Class)) or not collective (overrideNotCollective(Class)).

Since:
0.8

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.commons.betwixt.strategy.CollectiveTypeStrategy
CollectiveTypeStrategy.Default
 
Field Summary
 
Fields inherited from class org.apache.commons.betwixt.strategy.CollectiveTypeStrategy
DEFAULT
 
Constructor Summary
OverrideCollectiveTypeStategy()
          Constructs a strategy which delegates to CollectiveTypeStrategy#DEFAULT
OverrideCollectiveTypeStategy(CollectiveTypeStrategy delegate)
          Constructs a strategy which delegates all those that it does not override.
 
Method Summary
 boolean isCollective(java.lang.Class type)
          Is this a loop type class?
 void overrideCollective(java.lang.Class type)
          Marks the given type to be treated as collective.
 void overrideNotCollective(java.lang.Class type)
          Marks the given type to be treated as not collective
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OverrideCollectiveTypeStategy

public OverrideCollectiveTypeStategy()
Constructs a strategy which delegates to CollectiveTypeStrategy#DEFAULT


OverrideCollectiveTypeStategy

public OverrideCollectiveTypeStategy(CollectiveTypeStrategy delegate)
Constructs a strategy which delegates all those that it does not override.

Parameters:
delegate -
Method Detail

overrideCollective

public void overrideCollective(java.lang.Class type)
Marks the given type to be treated as collective.

Parameters:
type - Class, not null

overrideNotCollective

public void overrideNotCollective(java.lang.Class type)
Marks the given type to be treated as not collective

Parameters:
type -

isCollective

public boolean isCollective(java.lang.Class type)
Description copied from class: CollectiveTypeStrategy
Is this a loop type class?

Specified by:
isCollective in class CollectiveTypeStrategy
Parameters:
type - is this Class a loop type?
Returns:
true if the type is a loop type, or if type is null
See Also:
CollectiveTypeStrategy.isCollective(Class)


Copyright 2002-2008 The Apache Software Foundation. All Rights Reserved.