randoop
Class SubTypeSet

Object
  extended by SubTypeSet

public class SubTypeSet
extends Object

A set of classes. This data structure additionally allows for efficient answers to queries about can-be-used-as (Reflection.canBeUsedAs(Class,Class)) relationships.


Field Summary
Modifier and Type Field and Description
 boolean reversible
           
 IMultiMap<Class<?>,Class<?>> subTypesWithsequences
           
 ISimpleSet<Class<?>> typesWithsequences
           
 
Constructor Summary
Constructor and Description
SubTypeSet(boolean reversible)
           
 
Method Summary
Modifier and Type Method and Description
 void add(Class<?> c)
           
 boolean containsAssignableType(Class<?> c, Reflection.Match match)
          If match==COMPATIBLE_TYPE, returns true if this set contains any classes that can-be-used-as the given class c.
 Set<Class<?>> getElements()
           
 Set<Class<?>> getMatches(Class<?> c)
          Returns all the classes in the set that can-be-used-as the given c.
 void mark()
           
 int size()
           
 void undoLastStep()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

typesWithsequences

public ISimpleSet<Class<?>> typesWithsequences

subTypesWithsequences

public IMultiMap<Class<?>,Class<?>> subTypesWithsequences

reversible

public boolean reversible
Constructor Detail

SubTypeSet

public SubTypeSet(boolean reversible)
Method Detail

mark

public void mark()

undoLastStep

public void undoLastStep()

add

public void add(Class<?> c)

getMatches

public Set<Class<?>> getMatches(Class<?> c)
Returns all the classes in the set that can-be-used-as the given c.


containsAssignableType

public boolean containsAssignableType(Class<?> c,
                                      Reflection.Match match)
If match==COMPATIBLE_TYPE, returns true if this set contains any classes that can-be-used-as the given class c.

Otherwise, returns true if this set contains the given class c


size

public int size()

getElements

public Set<Class<?>> getElements()