public class ElementUtil
extends java.lang.Object
| Modifier and Type | Method and Description | 
|---|---|
static void | 
addImplementedInterface(Element client,
                       Element supplier)
Adds the implemented interface. 
 | 
static void | 
addRequiredInterface(Element client,
                    Element supplier)
Adds the required interface. 
 | 
static Class | 
extendClass(Element child,
           Class aClass)
Extend class. 
 | 
static java.util.Set<Element> | 
getAllAggregatedElements(Element element)
Gets the all aggregated elements. 
 | 
static java.util.List<Interface> | 
getAllCommonInterfaces(java.util.List<Element> participants)
Gets the all common interfaces. 
 | 
static java.util.List<Interface> | 
getAllCommonSuperInterfaces(java.util.List<Element> participants)
Gets the all common super interfaces. 
 | 
static java.util.List<Element> | 
getAllExtendedElements(Element child)
Gets the all extended elements. 
 | 
static java.util.List<Element> | 
getAllSubElements(Element parent)
Gets the all sub elements. 
 | 
static java.util.List<Element> | 
getAllSuperElements(Element element)
Gets the all super elements. 
 | 
static java.util.List<Interface> | 
getAllSuperInterfaces(Element child)
Gets the all super interfaces. 
 | 
static java.util.List<Interface> | 
getAllSuperInterfaces(java.util.List<Element> elements)
Gets the all super interfaces. 
 | 
static java.util.Set<java.lang.String> | 
getAppliedDesignPatterns(Element element)
Gets the applied design patterns. 
 | 
static java.util.List<Element> | 
getChainOfRelatedElementsWithSameConcern(java.util.List<Element> mainElements,
                                        Concern concern)
Gets the chain of related elements with same concern. 
 | 
static java.util.ArrayList<Element> | 
getElementsWithNoOwnConcernsAndWithAtLeastOneMethodWithNoConcerns(java.lang.Iterable<Element> elements)
Gets the elements with no own concerns and with at least one method with no concerns. 
 | 
static java.lang.String | 
getNameSpace(java.util.List<Element> elements)
Gets the name space. 
 | 
static java.util.Set<Concern> | 
getOwnAndMethodsCommonConcerns(java.util.List<Element> elements)
Gets the own and methods common concerns. 
 | 
static java.util.Set<Concern> | 
getOwnAndMethodsCommonConcernsOfAtLeastTwoElements(java.util.List<Element> elements)
Gets the own and methods common concerns of at least two elements. 
 | 
static java.util.Set<Concern> | 
getOwnAndMethodsConcerns(Element element)
Gets the own and methods concerns. 
 | 
static java.util.Set<Concern> | 
getOwnAndMethodsConcerns(java.util.List<Element> elements)
Gets the own and methods concerns. 
 | 
static java.util.List<Relationship> | 
getRelationships(Element element)
Gets the relationships. 
 | 
static java.util.List<Relationship> | 
getRelationships(java.util.List<? extends Element> elements)
Gets the relationships. 
 | 
static java.util.HashMap<Concern,java.util.List<Element>> | 
groupElementsByConcern(java.util.List<Element> elements)
Group elements by concern. 
 | 
static Class | 
implementInterface(Element child,
                  Interface anInterface)
Implement interface. 
 | 
static void | 
implementInterface(java.util.List<Element> elements,
                  Interface anInterface,
                  java.util.List<Element> adapterList,
                  java.util.List<Element> adapteeList)
Implement interface. 
 | 
static boolean | 
isClassOrInterface(Element element)
Checks if is class or interface. 
 | 
static boolean | 
isTypeOf(Element child,
        Element parent)
Checks if is type of. 
 | 
static void | 
verifyAndRemoveImplementedInterface(Element client,
                                   Element supplier)
Verify and remove implemented interface. 
 | 
static void | 
verifyAndRemoveRequiredInterface(Element client,
                                Element supplier)
Verify and remove required interface. 
 | 
public static java.util.List<Relationship> getRelationships(Element element)
element - the elementpublic static java.util.List<Relationship> getRelationships(java.util.List<? extends Element> elements)
elements - the elementspublic static boolean isTypeOf(Element child, Element parent)
child - the childparent - the parentpublic static java.util.List<Interface> getAllSuperInterfaces(Element child)
child - the childpublic static java.util.List<Interface> getAllSuperInterfaces(java.util.List<Element> elements)
elements - the elementspublic static java.util.List<Interface> getAllCommonInterfaces(java.util.List<Element> participants)
participants - the participantspublic static java.util.List<Interface> getAllCommonSuperInterfaces(java.util.List<Element> participants)
participants - the participantspublic static java.util.List<Element> getAllExtendedElements(Element child)
child - the childpublic static java.util.List<Element> getAllSubElements(Element parent)
parent - the parentpublic static boolean isClassOrInterface(Element element)
element - the elementpublic static java.util.Set<Concern> getOwnAndMethodsCommonConcerns(java.util.List<Element> elements)
elements - the elementspublic static java.util.Set<Concern> getOwnAndMethodsCommonConcernsOfAtLeastTwoElements(java.util.List<Element> elements)
elements - the elementspublic static java.util.Set<Concern> getOwnAndMethodsConcerns(java.util.List<Element> elements)
elements - the elementspublic static java.util.Set<Concern> getOwnAndMethodsConcerns(Element element)
element - the elementpublic static java.util.Set<Element> getAllAggregatedElements(Element element)
element - the elementpublic static java.util.HashMap<Concern,java.util.List<Element>> groupElementsByConcern(java.util.List<Element> elements)
elements - the elementspublic static java.util.ArrayList<Element> getElementsWithNoOwnConcernsAndWithAtLeastOneMethodWithNoConcerns(java.lang.Iterable<Element> elements)
elements - the elementspublic static java.lang.String getNameSpace(java.util.List<Element> elements)
elements - the elementspublic static void implementInterface(java.util.List<Element> elements, Interface anInterface, java.util.List<Element> adapterList, java.util.List<Element> adapteeList)
elements - the elementsanInterface - the an interfaceadapterList - the adapter listadapteeList - the adaptee listpublic static Class implementInterface(Element child, Interface anInterface)
child - the childanInterface - the an interfacepublic static Class extendClass(Element child, Class aClass)
child - the childaClass - the a classpublic static void verifyAndRemoveRequiredInterface(Element client, Element supplier)
client - the clientsupplier - the supplierpublic static void verifyAndRemoveImplementedInterface(Element client, Element supplier)
client - the clientsupplier - the supplierpublic static void addRequiredInterface(Element client, Element supplier)
client - the clientsupplier - the supplierpublic static void addImplementedInterface(Element client, Element supplier)
client - the clientsupplier - the supplierpublic static java.util.List<Element> getAllSuperElements(Element element)
element - the elementpublic static java.util.List<Element> getChainOfRelatedElementsWithSameConcern(java.util.List<Element> mainElements, Concern concern)
mainElements - the main elementsconcern - the concernpublic static java.util.Set<java.lang.String> getAppliedDesignPatterns(Element element)
element - the element