Associate synthetic component function descriptors with corresponding
constructor parameters
This commit is contained in:
@@ -62,6 +62,10 @@ public final class JvmAbi {
|
||||
return isDelegated ? propertyName.asString() + DELEGATED_PROPERTY_NAME_SUFFIX : propertyName.asString();
|
||||
}
|
||||
|
||||
public static boolean isAccessorName(String name) {
|
||||
return name.startsWith(JvmAbi.GETTER_PREFIX) || name.startsWith(JvmAbi.SETTER_PREFIX);
|
||||
}
|
||||
|
||||
private JvmAbi() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package org.jetbrains.jet.lang.resolve.name
|
||||
|
||||
import java.util.regex.Pattern
|
||||
|
||||
public val COMPONENT_FUNCTION_PATTERN: Pattern = Pattern.compile("^component(\\d+)$")
|
||||
|
||||
public fun String.isComponentFunctionName(): Boolean = COMPONENT_FUNCTION_PATTERN.matcher(this).matches()
|
||||
public fun Name.isComponentFunctionName(): Boolean = asString().isComponentFunctionName()
|
||||
Reference in New Issue
Block a user