org.springframework.beans.factory.support

Class MethodOverrides

  • java.lang.Object
    • org.springframework.beans.factory.support.MethodOverrides


  • public class MethodOverrides
    extends java.lang.Object
    Set of method overrides, determining which, if any, methods on a managed object the Spring IoC container will override at runtime.

    The currently supported MethodOverride variants are LookupOverride and ReplaceOverride.

    Since:
    1.1
    Author:
    Rod Johnson, Juergen Hoeller
    See Also:
    MethodOverride
    • Constructor Detail

      • MethodOverrides

        public MethodOverrides()
        Create new MethodOverrides.
      • MethodOverrides

        public MethodOverrides(MethodOverrides other)
        Deep copy constructor.
    • Method Detail

      • addOverrides

        public void addOverrides(@Nullable
                                 MethodOverrides other)
        Copy all given method overrides into this object.
      • addOverride

        public void addOverride(MethodOverride override)
        Add the given method override.
      • getOverrides

        public java.util.Set<MethodOverride> getOverrides()
        Return all method overrides contained by this object.
        Returns:
        a Set of MethodOverride objects
        See Also:
        MethodOverride
      • isEmpty

        public boolean isEmpty()
        Return whether the set of method overrides is empty.
      • getOverride

        @Nullable
        public MethodOverride getOverride(java.lang.reflect.Method method)
        Return the override for the given method, if any.
        Parameters:
        method - method to check for overrides for
        Returns:
        the method override, or null if none
      • equals

        public boolean equals(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object