Package org.apache.iceberg.common
Class DynMethods.Builder
java.lang.Object
org.apache.iceberg.common.DynMethods.Builder
- Enclosing class:
- DynMethods
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Returns the first valid implementation as a UnboundMethod or throws a RuntimeError if there is none.Returns the first valid implementation as a BoundMethod or throws a RuntimeError if there is none.Returns the first valid implementation as a UnboundMethod or throws a NoSuchMethodException if there is none.buildChecked(Object receiver) Returns the first valid implementation as a BoundMethod or throws a NoSuchMethodException if there is none.Returns the first valid implementation as a StaticMethod or throws a RuntimeException if there is none.Returns the first valid implementation as a StaticMethod or throws a NoSuchMethodException if there is none.hiddenImpl(Class<?> targetClass, Class<?>... argClasses) Checks for a method implementation.hiddenImpl(Class<?> targetClass, String methodName, Class<?>... argClasses) Checks for a method implementation.hiddenImpl(String className, Class<?>... argClasses) Checks for an implementation, first finding the given class by name.hiddenImpl(String className, String methodName, Class<?>... argClasses) Checks for an implementation, first finding the given class by name.Checks for a method implementation.Checks for a method implementation.Checks for an implementation, first finding the given class by name.Checks for an implementation, first finding the given class by name.loader(ClassLoader newLoader) Set theClassLoaderused to lookup classes by name.orNoop()If no implementation has been found, adds a NOOP method.
- 
Constructor Details- 
Builder
 
- 
- 
Method Details- 
loaderSet theClassLoaderused to lookup classes by name.If not set, the current thread's ClassLoader is used. - Parameters:
- newLoader- a ClassLoader
- Returns:
- this Builder for method chaining
 
- 
orNoopIf no implementation has been found, adds a NOOP method.Note: calls to impl will not match after this method is called! - Returns:
- this Builder for method chaining
 
- 
implChecks for an implementation, first finding the given class by name.- Parameters:
- className- name of a class
- methodName- name of a method (different from constructor)
- argClasses- argument classes for the method
- Returns:
- this Builder for method chaining
- See Also:
 
- 
implChecks for an implementation, first finding the given class by name.The name passed to the constructor is the method name used. - Parameters:
- className- name of a class
- argClasses- argument classes for the method
- Returns:
- this Builder for method chaining
- See Also:
 
- 
implChecks for a method implementation.- Parameters:
- targetClass- a class instance
- methodName- name of a method (different from constructor)
- argClasses- argument classes for the method
- Returns:
- this Builder for method chaining
- See Also:
 
- 
implChecks for a method implementation.The name passed to the constructor is the method name used. - Parameters:
- targetClass- a class instance
- argClasses- argument classes for the method
- Returns:
- this Builder for method chaining
- See Also:
 
- 
buildReturns the first valid implementation as a UnboundMethod or throws a RuntimeError if there is none.- Returns:
- a DynMethods.UnboundMethodwith a valid implementation
- Throws:
- RuntimeException- if no implementation was found
 
- 
buildReturns the first valid implementation as a BoundMethod or throws a RuntimeError if there is none.- Parameters:
- receiver- an Object to receive the method invocation
- Returns:
- a DynMethods.BoundMethodwith a valid implementation and receiver
- Throws:
- IllegalStateException- if the method is static
- IllegalArgumentException- if the receiver's class is incompatible
- RuntimeException- if no implementation was found
 
- 
buildCheckedReturns the first valid implementation as a UnboundMethod or throws a NoSuchMethodException if there is none.- Returns:
- a DynMethods.UnboundMethodwith a valid implementation
- Throws:
- NoSuchMethodException- if no implementation was found
 
- 
buildCheckedReturns the first valid implementation as a BoundMethod or throws a NoSuchMethodException if there is none.- Parameters:
- receiver- an Object to receive the method invocation
- Returns:
- a DynMethods.BoundMethodwith a valid implementation and receiver
- Throws:
- IllegalStateException- if the method is static
- IllegalArgumentException- if the receiver's class is incompatible
- NoSuchMethodException- if no implementation was found
 
- 
buildStaticCheckedReturns the first valid implementation as a StaticMethod or throws a NoSuchMethodException if there is none.- Returns:
- a DynMethods.StaticMethodwith a valid implementation
- Throws:
- IllegalStateException- if the method is not static
- NoSuchMethodException- if no implementation was found
 
- 
buildStaticReturns the first valid implementation as a StaticMethod or throws a RuntimeException if there is none.- Returns:
- a DynMethods.StaticMethodwith a valid implementation
- Throws:
- IllegalStateException- if the method is not static
- RuntimeException- if no implementation was found
 
 
-