diff --git a/java/java-analysis-api/src/com/intellij/lang/jvm/actions/CreateFieldRequest.kt b/java/java-analysis-api/src/com/intellij/lang/jvm/actions/CreateFieldRequest.kt index d5e39715ec20..e824b0de5c02 100644 --- a/java/java-analysis-api/src/com/intellij/lang/jvm/actions/CreateFieldRequest.kt +++ b/java/java-analysis-api/src/com/intellij/lang/jvm/actions/CreateFieldRequest.kt @@ -19,13 +19,40 @@ import com.intellij.lang.jvm.JvmModifier interface CreateFieldRequest { + /** + * Request may be bound to the PSI-element in call-site language, + * which means request will become invalid if element is invalidated. + * + * @return `true` if it is safe to call other methods of this object, `false` otherwise + */ val isValid: Boolean + /** + * @return name of the field to be created + */ val fieldName: String + /** + * The common interface is not ready yet, so this is [Any]?. + * For Java language an array of [com.intellij.codeInsight.ExpectedTypeInfo] is returned now. + * + * @return expected type info of the field to be created + */ val fieldType: Any? + /** + * Implementation are free to render any modifiers as long as they don't contradict with requested ones. + * Example: if constant field is requested then it will be rendered + * with `static final` modifiers even if they are not present in this collection. + * + * @return modifiers that should be present when requested field is compiled + */ val modifiers: Collection + /** + * Constant fields may be used in annotations and in other constant expressions. + * + * @return whether the field must be a compile-time constant + */ val constant: Boolean }