Package org.apache.iceberg.common
Class DynFields.Builder
java.lang.Object
org.apache.iceberg.common.DynFields.Builder
- Enclosing class:
- DynFields
- 
Method SummaryModifier and TypeMethodDescription<T> DynFields.UnboundField<T> build()Returns the first valid implementation as a UnboundField or throws a NoSuchFieldException if there is none.<T> DynFields.BoundField<T> Returns the first valid implementation as a BoundMethod or throws a RuntimeException if there is none.<T> DynFields.UnboundField<T> Returns the first valid implementation as a UnboundField or throws a NoSuchFieldException if there is none.<T> DynFields.BoundField<T> buildChecked(Object target) Returns the first valid implementation as a BoundMethod or throws a NoSuchMethodException if there is none.<T> DynFields.StaticField<T> Returns the first valid implementation as a StaticField or throws a RuntimeException if there is none.Instructs this builder to return AlwaysNull if no implementation is found.hiddenImpl(Class<?> targetClass, String fieldName) Checks for a hidden implementation.hiddenImpl(String className, String fieldName) Checks for a hidden implementation, first finding the class by name.Checks for an implementation.Checks for an implementation, first finding the class by name.loader(ClassLoader newLoader) Set theClassLoaderused to lookup classes by name.
- 
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
 
- 
defaultAlwaysNullInstructs this builder to return AlwaysNull if no implementation is found.- Returns:
- this Builder for method chaining
 
- 
implChecks for an implementation, first finding the class by name.- Parameters:
- className- name of a class
- fieldName- name of the field
- Returns:
- this Builder for method chaining
- See Also:
 
- 
implChecks for an implementation.- Parameters:
- targetClass- a class instance
- fieldName- name of a field (different from constructor)
- Returns:
- this Builder for method chaining
- See Also:
 
- 
buildCheckedReturns the first valid implementation as a UnboundField or throws a NoSuchFieldException if there is none.- Type Parameters:
- T- Java class stored in the field
- Returns:
- a DynFields.UnboundFieldwith a valid implementation
- Throws:
- NoSuchFieldException- if no implementation was found
 
- 
buildCheckedReturns the first valid implementation as a BoundMethod or throws a NoSuchMethodException if there is none.- Type Parameters:
- T- Java class stored in the field
- Parameters:
- target- an Object on which to get and set the field
- Returns:
- a DynFields.BoundFieldwith a valid implementation and target
- Throws:
- IllegalStateException- if the method is static
- IllegalArgumentException- if the receiver's class is incompatible
- NoSuchFieldException- if no implementation was found
 
- 
buildReturns the first valid implementation as a UnboundField or throws a NoSuchFieldException if there is none.- Type Parameters:
- T- Java class stored in the field
- Returns:
- a DynFields.UnboundFieldwith a valid implementation
- Throws:
- RuntimeException- if no implementation was found
 
- 
buildReturns the first valid implementation as a BoundMethod or throws a RuntimeException if there is none.- Type Parameters:
- T- Java class stored in the field
- Parameters:
- target- an Object on which to get and set the field
- Returns:
- a DynFields.BoundFieldwith a valid implementation and target
- Throws:
- IllegalStateException- if the method is static
- IllegalArgumentException- if the receiver's class is incompatible
- RuntimeException- if no implementation was found
 
- 
buildStaticReturns the first valid implementation as a StaticField or throws a RuntimeException if there is none.- Type Parameters:
- T- Java class stored in the field
- Returns:
- a DynFields.StaticFieldwith a valid implementation
- Throws:
- IllegalStateException- if the method is not static
- RuntimeException- if no implementation was found
 
 
-