Class GroupingLooseResolver<G>

  • Type Parameters:
    G - grouping

    public class GroupingLooseResolver<G>
    extends Object
    Provides augmentation resolving upon given Augmentable. Used Augmentations do not share Augmentable.
    Usage: in case there are multiple Augmentable classes which might contain corresponding Augmentations (1:1..n binding). And those Augmentations are sharing the same grouping so that they could be processed in the same way.
    • Constructor Detail

      • GroupingLooseResolver

        public GroupingLooseResolver​(Class<G> commonInterface)
        Constructor.
        Parameters:
        commonInterface - common interface
    • Method Detail

      • getClasses

        public Set<Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<?>>> getClasses()
        Get augmentation classes.
        Returns:
        list of augmentation classes
      • add

        public GroupingLooseResolver<G> add​(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<?>> cls)
        Adds an augmentation class.
        Parameters:
        cls - equivalent augmentation class
        Returns:
        this for chaining
      • getExtension

        public <T extends org.opendaylight.yangtools.yang.binding.Augmentable<T>> Optional<G> getExtension​(org.opendaylight.yangtools.yang.binding.DataObject data)
        Gets the extension for the give data.
        Type Parameters:
        T - type of data
        Parameters:
        data - parameter(data) for getExtension
        Returns:
        shared grouping