Class Associations


  • public class Associations
    extends java.lang.Object
    Convenience utility methods that operate on Association elements.
    • Constructor Detail

      • Associations

        public Associations()
    • Method Detail

      • isAggregation

        public static boolean isAggregation​(Association association,
                                            AggregationKind aggregationKind)
        Determines if association is of specified aggregation kind.
        Parameters:
        association - association element
        aggregationKind - AggregationKindEnum.SHARED - aggregation, AggregationKindEnum.COMPOSITE - composition
        Returns:
        true if one of association ends has set specified aggregation kind
      • isDirectedAggregation

        public static boolean isDirectedAggregation​(Association association,
                                                    AggregationKind aggregationKind)
        Determines if association is of specified aggregation kind and directed.
        Parameters:
        association - association element
        aggregationKind - AggregationKindEnum.SHARED - aggregation, AggregationKindEnum.COMPOSITE - composition
        Returns:
        true if one of association ends has set specified aggregation kind
      • isDirectedAssociation

        public static boolean isDirectedAssociation​(Association association)
        Check if association is directed
        Parameters:
        association - association
        Returns:
        true if at least one end is navigable
      • isNonNavigableAssociation

        public static boolean isNonNavigableAssociation​(Association association)
        Check if association is non navigable
        Parameters:
        association - association
        Returns:
        true if both ends are not navigable
      • getFirstMemberEnd

        public static Property getFirstMemberEnd​(Association association)
        Get first property member end of association.
        Parameters:
        association - association element
        Returns:
        first property member end of association
      • getSecondMemberEnd

        public static Property getSecondMemberEnd​(Association association)
        Get second property member end of association.
        Parameters:
        association - association element
        Returns:
        second property member end of association