Class FlowComponentQuirks

java.lang.Object
com.vaadin.copilot.javarewriter.FlowComponentQuirks

public final class FlowComponentQuirks extends Object
This class contains hacks related to Flow components and how they work.
  • Method Details

    • getClassForTag

      public static String getClassForTag(String tag)
      Returns the Java class name for a given HTML tag.
      Parameters:
      tag - the HTML tag
      Returns:
      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 type
      prop - the property name
      value - the property value
      Returns:
      the rewritten value or the original value if no rewriting is needed
    • convertReactPropertyToJavaSetter

      public static String convertReactPropertyToJavaSetter(String property, Class<?> type)
      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 name
      type - the component type
      Returns:
      the Java setter method name or null if no mapping is found
    • isInvertedBoolean

      public static boolean isInvertedBoolean(String property, Class<?> type)