com.vaadin.copilot.javarewriter.
Class FlowComponentQuirks
This class contains hacks related to Flow components and how they work.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object
componentSpecificValueMapping
(Class<?> componentType, String prop, Object value) Rewrites the value of a property for a specific component type.
static String
convertReactPropertyToJavaSetter
(String property, Class<?> type) Converts a React property name to a Java setter method name.
static String
getClassForTag
(String tag) Returns the Java class name for a given HTML tag.
static boolean
isInvertedBoolean
(String property, Class<?> type)
-
Method Details
-
getClassForTag
Returns the Java class name for a given HTML tag.
Parameters:
tag
- the HTML tagReturns:
the Java class name
-
componentSpecificValueMapping
public static Object componentSpecificValueMapping(Class<?> componentType, String prop, Object value) Rewrites the value of a property for a specific component type.
Parameters:
componentType
- the component typeprop
- the property namevalue
- the property valueReturns:
the rewritten value or the original value if no rewriting is needed
-
convertReactPropertyToJavaSetter
Converts a React property name to a Java setter method name.
Used to map React properties to Java setters when the react property API does not match the Java API.
Parameters:
property
- the property nametype
- the component typeReturns:
the Java setter method name or
null
if no mapping is found -
isInvertedBoolean
-