Package org.fastnate.generator.context
Enum Class AccessStyle
- All Implemented Interfaces:
Serializable,Comparable<AccessStyle>,Constable
Indicates how persistent attributes are accessed.
- Author:
- Tobias Liefke
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionabstract <E> Iterable<AttributeAccessor> getDeclaredAttributes(Class<E> inspectedClass, Class<? extends E> implementationClass) Finds all attributes of the current access type that are referenced in the given class.static AccessStylegetStyle(jakarta.persistence.AccessType type) Determines the correct mapping to the style for the given accesstype.static AccessStyleReturns the enum constant of this class with the specified name.static AccessStyle[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FIELD
-
METHOD
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getStyle
Determines the correct mapping to the style for the given accesstype.- Parameters:
type- the access type as defined in anAccessannotation.- Returns:
- the matching style
-
getDeclaredAttributes
public abstract <E> Iterable<AttributeAccessor> getDeclaredAttributes(Class<E> inspectedClass, Class<? extends E> implementationClass) Finds all attributes of the current access type that are referenced in the given class.- Parameters:
inspectedClass- the class to inspectimplementationClass- the class that is actually the type of the object, eitherinspectedClassor a sub class - necessary for resolving generics- Returns:
- all non static attributes found in the given class
-