Class ImmutableMethodReference

All Implemented Interfaces:
Comparable<MethodReference>, MethodReference, Reference, ImmutableReference

public class ImmutableMethodReference extends BaseMethodReference implements ImmutableReference
  • Field Details

    • definingClass

      @Nonnull protected final String definingClass
    • name

      @Nonnull protected final String name
    • parameters

      @Nonnull protected final com.google.common.collect.ImmutableList<String> parameters
    • returnType

      @Nonnull protected final String returnType
  • Constructor Details

    • ImmutableMethodReference

      public ImmutableMethodReference(@Nonnull String definingClass, @Nonnull String name, @Nullable Iterable<? extends CharSequence> parameters, @Nonnull String returnType)
    • ImmutableMethodReference

      public ImmutableMethodReference(@Nonnull String definingClass, @Nonnull String name, @Nullable com.google.common.collect.ImmutableList<String> parameters, @Nonnull String returnType)
  • Method Details

    • of

      @Nonnull public static ImmutableMethodReference of(@Nonnull MethodReference methodReference)
    • getDefiningClass

      @Nonnull public String getDefiningClass()
      Description copied from interface: MethodReference
      Gets the type of the class that defines the referenced method.
      Specified by:
      getDefiningClass in interface MethodReference
      Returns:
      The type of the class that defines the referenced method
    • getName

      @Nonnull public String getName()
      Description copied from interface: MethodReference
      Gets the name of the referenced method.
      Specified by:
      getName in interface MethodReference
      Returns:
      The name of the referenced method
    • getParameterTypes

      @Nonnull public com.google.common.collect.ImmutableList<String> getParameterTypes()
      Description copied from interface: MethodReference
      Gets a list of the types of the parameters of this method.
      Specified by:
      getParameterTypes in interface MethodReference
      Returns:
      A list of the parameter types of this method, as strings.
    • getReturnType

      @Nonnull public String getReturnType()
      Description copied from interface: MethodReference
      Gets the return type of the referenced method.
      Specified by:
      getReturnType in interface MethodReference
      Returns:
      The return type of the referenced method.