Package com.vaadin.copilot.rewriter
Interface CopySource
- All Known Implementing Classes:
JavaCopySource
public interface CopySource
What copying a component needs to ask of its source file.
Copy is mostly a runtime operation: the properties come from the live element, and the quirks that drop some of them again are reflection. The source is consulted three times, and only these three times — which is what lets one implementation serve any language. #9828's sibling work on the API-selection dialog found the same shape.
-
Method Summary
Modifier and TypeMethodDescriptionitemType()The bean type aGridis typed with, for the paste to rebuild.booleansetsProperty(String propertyKey) Whether the file actually sets this property.
-
Method Details
-
setsProperty
Whether the file actually sets this property.A live component reports a value for
minandmaxwhether or not anyone set them, so a copy would carry defaults the original never had and paste them as explicit calls.- Parameters:
propertyKey- the JavaBean property name- Returns:
- true if the source sets it
-
localVariableName
- Returns:
- the local variable the component is assigned to, if it is one
-
fieldVariableName
- Returns:
- the field the component is assigned to, if it is one
-
itemType
The bean type aGridis typed with, for the paste to rebuild.- Returns:
- the class name, or empty where the language cannot resolve it
-