Top Description Inners Fields Constructors Methods
org.hibernate.validator.internal.properties.javabean

public Class JavaBeanHelper

extends Object
Class Inheritance
Static Imports
org.hibernate.validator.internal.util.logging.Messages.MESSAGES

Helper class that gives ability to find Constrainable versions of JavaBean's fields, getters, constructors and methods.
Author
Marko Bekhta

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
private final GetterPropertySelectionStrategy
private final PropertyNodeNameProvider

Constructor Summary

AccessConstructor and Description
public
JavaBeanHelper(GetterPropertySelectionStrategy getterPropertySelectionStrategy, PropertyNodeNameProvider propertyNodeNameProvider)

Method Summary

Modifier and TypeMethod and Description
public JavaBeanExecutable<?>
executable(Executable executable)

public JavaBeanExecutable<?>
executable(Class<?> declaringClass, Executable executable)

public JavaBeanMethod
executable(Class<?> declaringClass, Method method)

public JavaBeanField
field(Field field)

public <T> Optional<JavaBeanConstructor>
findDeclaredConstructor(Class<T> declaringClass, Class<?>... parameterTypes)

public Optional<JavaBeanField>
findDeclaredField(Class<?> declaringClass, String property)

public Optional<JavaBeanGetter>
findDeclaredGetter(Class<?> declaringClass, String property)

public Optional<JavaBeanMethod>
findDeclaredMethod(Class<?> declaringClass, String methodName, Class<?>... parameterTypes)

public Optional<JavaBeanGetter>
findGetter(Class<?> declaringClass, String property)

private Optional<JavaBeanGetter>
findGetter(Class<?> declaringClass, String property, boolean lookForMethodsOnSuperClass)

public GetterPropertySelectionStrategy
public PropertyNodeNameProvider
private <T> T
run(PrivilegedAction<T> action)

Runs the given privileged action, using a privileged block if required

Note

This must never be changed into a publicly available method to avoid execution of arbitrary privileged actions within HV's protection domain.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

getterPropertySelectionStrategyback to summary
private final GetterPropertySelectionStrategy getterPropertySelectionStrategy
propertyNodeNameProviderback to summary
private final PropertyNodeNameProvider propertyNodeNameProvider

Constructor Detail

JavaBeanHelperback to summary
public JavaBeanHelper(GetterPropertySelectionStrategy getterPropertySelectionStrategy, PropertyNodeNameProvider propertyNodeNameProvider)

Method Detail

executableback to summary
public JavaBeanExecutable<?> executable(Executable executable)
executableback to summary
public JavaBeanExecutable<?> executable(Class<?> declaringClass, Executable executable)
executableback to summary
public JavaBeanMethod executable(Class<?> declaringClass, Method method)
fieldback to summary
public JavaBeanField field(Field field)
findDeclaredConstructorback to summary
public <T> Optional<JavaBeanConstructor> findDeclaredConstructor(Class<T> declaringClass, Class<?>... parameterTypes)
findDeclaredFieldback to summary
public Optional<JavaBeanField> findDeclaredField(Class<?> declaringClass, String property)
findDeclaredGetterback to summary
public Optional<JavaBeanGetter> findDeclaredGetter(Class<?> declaringClass, String property)
findDeclaredMethodback to summary
public Optional<JavaBeanMethod> findDeclaredMethod(Class<?> declaringClass, String methodName, Class<?>... parameterTypes)
findGetterback to summary
public Optional<JavaBeanGetter> findGetter(Class<?> declaringClass, String property)
findGetterback to summary
private Optional<JavaBeanGetter> findGetter(Class<?> declaringClass, String property, boolean lookForMethodsOnSuperClass)
getGetterPropertySelectionStrategyback to summary
public GetterPropertySelectionStrategy getGetterPropertySelectionStrategy()
getPropertyNodeNameProviderback to summary
public PropertyNodeNameProvider getPropertyNodeNameProvider()
runback to summary
private <T> T run(PrivilegedAction<T> action)

Runs the given privileged action, using a privileged block if required

Note

This must never be changed into a publicly available method to avoid execution of arbitrary privileged actions within HV's protection domain.

Annotations
@IgnoreForbiddenApisErrors
reason:SecurityManager is deprecated in JDK17
org.hibernate.validator.internal.properties.javabean back to summary

private Class JavaBeanHelper.JavaBeanConstrainableExecutable

extends Object
implements ConstrainableExecutable
Class Inheritance
  • java.lang.Object
  • org.hibernate.validator.internal.properties.javabean.JavaBeanHelper.JavaBeanConstrainableExecutable
All Implemented Interfaces
org.hibernate.validator.spi.properties.ConstrainableExecutable

Field Summary

Modifier and TypeField and Description
private final Method

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String
public Class<?>[]
public Class<?>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

methodback to summary
private final Method method

Constructor Detail

JavaBeanConstrainableExecutableback to summary
private JavaBeanConstrainableExecutable(Method method)

Method Detail

getNameback to summary
public String getName()

Implements org.hibernate.validator.spi.properties.ConstrainableExecutable.getName.

Returns:String

Doc from org.hibernate.validator.spi.properties.ConstrainableExecutable.getName.

the name of the method represented by this ConstrainableExecutable object

Annotations
@Override
getParameterTypesback to summary
public Class<?>[] getParameterTypes()

Implements org.hibernate.validator.spi.properties.ConstrainableExecutable.getParameterTypes.

Returns:Class<?>[]

Doc from org.hibernate.validator.spi.properties.ConstrainableExecutable.getParameterTypes.

the parameter types for the executable this object represents

Annotations
@Override
getReturnTypeback to summary
public Class<?> getReturnType()

Implements org.hibernate.validator.spi.properties.ConstrainableExecutable.getReturnType.

Returns:Class<?>

Doc from org.hibernate.validator.spi.properties.ConstrainableExecutable.getReturnType.

the return type for the method this object represents

Annotations
@Override
org.hibernate.validator.internal.properties.javabean back to summary

private Class JavaBeanHelper.JavaBeanPropertyImpl

extends Object
implements JavaBeanProperty
Class Inheritance
  • java.lang.Object
  • org.hibernate.validator.internal.properties.javabean.JavaBeanHelper.JavaBeanPropertyImpl
All Implemented Interfaces
org.hibernate.validator.spi.nodenameprovider.JavaBeanProperty, org.hibernate.validator.spi.nodenameprovider.Property

Field Summary

Modifier and TypeField and Description
private final Class<?>
private final String

Constructor Summary

AccessConstructor and Description
private
JavaBeanPropertyImpl(Class<?> declaringClass, String name)

Method Summary

Modifier and TypeMethod and Description
public Class<?>
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

declaringClassback to summary
private final Class<?> declaringClass
nameback to summary
private final String name

Constructor Detail

JavaBeanPropertyImplback to summary
private JavaBeanPropertyImpl(Class<?> declaringClass, String name)

Method Detail

getDeclaringClassback to summary
public Class<?> getDeclaringClass()

Implements org.hibernate.validator.spi.nodenameprovider.JavaBeanProperty.getDeclaringClass.

Doc from org.hibernate.validator.spi.nodenameprovider.JavaBeanProperty.getDeclaringClass.

Owner class of the property.

Returns:Class<?>

Class owning class of the property

Annotations
@Override
getNameback to summary
public String getName()

Implements org.hibernate.validator.spi.nodenameprovider.Property.getName.

Doc from org.hibernate.validator.spi.nodenameprovider.Property.getName.

Returns the property name.

Returns:String

String representing the property name

Annotations
@Override