Skip to content

Commit 6e858eb

Browse files
Soy Authorscopybara-github
authored andcommitted
internal changes
PiperOrigin-RevId: 800696479
1 parent f4e6081 commit 6e858eb

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

java/src/com/google/template/soy/shared/internal/BuiltinMethod.java

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -555,12 +555,6 @@ public static String protoFieldToGetAsStringMethodName(String fieldName) {
555555
return "get" + CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, fieldName) + "_asString";
556556
}
557557

558-
public static String protoFieldToGetAsLegacyNumberOrStringMethodName(String fieldName) {
559-
return "get"
560-
+ CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, fieldName)
561-
+ "_asLegacyNumberOrString";
562-
}
563-
564558
public static String protoFieldToGetReadonlyMethodName(String fieldName) {
565559
return "getReadonly" + CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, fieldName);
566560
}
@@ -575,12 +569,6 @@ public static String fieldToGetOrUndefinedAsStringMethodName(String fieldName) {
575569
+ "OrUndefined_asString";
576570
}
577571

578-
public static String fieldToGetOrUndefinedAsLegacyNumberOrStringMethodName(String fieldName) {
579-
return "get"
580-
+ CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, fieldName)
581-
+ "OrUndefined_asLegacyNumberOrString";
582-
}
583-
584572
private final String name;
585573
private final int argCount;
586574

@@ -713,25 +701,6 @@ private static Optional<String> getGetterAsStringFieldName(String methodName) {
713701
return Optional.of(CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_CAMEL, middle));
714702
}
715703

716-
private static Optional<String> getGetterAsLegacyNumberOrStringFieldName(String methodName) {
717-
if (methodName.length() <= 3) {
718-
return Optional.empty();
719-
}
720-
721-
if (!methodName.startsWith("get")
722-
|| !methodName.endsWith("_asLegacyNumberOrString")
723-
|| methodName.endsWith("OrUndefined_asLegacyNumberOrString")) {
724-
return Optional.empty();
725-
}
726-
727-
String middle =
728-
methodName.substring(3, methodName.length() - "_asLegacyNumberOrString".length());
729-
if (middle.length() > 0 && !Ascii.isUpperCase(middle.charAt(0))) {
730-
return Optional.empty();
731-
}
732-
return Optional.of(CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_CAMEL, middle));
733-
}
734-
735704
private static Optional<String> getGetOrUndefinedFieldName(String methodName) {
736705
if (!methodName.startsWith("get") || !methodName.endsWith("OrUndefined")) {
737706
return Optional.empty();
@@ -754,21 +723,6 @@ private static Optional<String> getGetOrUndefinedAsStringFieldName(String method
754723
return Optional.of(CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_CAMEL, middle));
755724
}
756725

757-
private static Optional<String> getGetOrUndefinedAsLegacyNumberOrStringFieldName(
758-
String methodName) {
759-
if (!methodName.startsWith("get")
760-
|| !methodName.endsWith("OrUndefined_asLegacyNumberOrString")) {
761-
return Optional.empty();
762-
}
763-
String middle =
764-
methodName.substring(
765-
3, methodName.length() - "OrUndefined_asLegacyNumberOrString".length());
766-
if (middle.length() > 0 && !Ascii.isUpperCase(middle.charAt(0))) {
767-
return Optional.empty();
768-
}
769-
return Optional.of(CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_CAMEL, middle));
770-
}
771-
772726
private static SoyType computeTypeForProtoFieldName(
773727
SoyType baseType,
774728
String fieldName,

0 commit comments

Comments
 (0)