Skip to content

Commit

Permalink
Internal.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 650322487
  • Loading branch information
varomodt authored and copybara-github committed Jul 8, 2024
1 parent 28b573e commit cdfe069
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions java/src/com/google/template/soy/internal/proto/ProtoUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import static com.google.common.base.Preconditions.checkArgument;

import com.google.apps.jspb.Jspb;
import com.google.common.base.CaseFormat;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
Expand Down Expand Up @@ -239,4 +240,14 @@ public static boolean isMessageLike(FieldDescriptor field) {
}
return field.getJavaType() == FieldDescriptor.JavaType.MESSAGE;
}

public static boolean isNumberInt64(FieldDescriptor field) {
if (field.getJavaType() != FieldDescriptor.JavaType.LONG) {
return false;
}
if (field.getOptions().hasExtension(Jspb.jstype)) {
return field.getOptions().getExtension(Jspb.jstype) != Jspb.JsType.STRING;
}
return field.getOptions().getJstype() != JSType.JS_STRING;
}
}

0 comments on commit cdfe069

Please sign in to comment.