[apex] AbstractApexNode - hide literalToString and caseNormalizedTypeIfPrimitive

These are helper methods to be used only inside the ast package.
This commit is contained in:
Andreas Dangel
2024-02-09 12:10:17 +01:00
parent 31a79ef671
commit f6bf245914

View File

@ -186,7 +186,7 @@ abstract class AbstractApexNode extends AbstractNode<AbstractApexNode, ApexNode<
}
/** Returns the string value of the {@link LiteralExpression}. */
protected static String literalToString(LiteralExpression expr) {
static String literalToString(LiteralExpression expr) {
if (expr instanceof LiteralExpression.StringVal) {
return ((LiteralExpression.StringVal) expr).getValue();
} else if (expr instanceof LiteralExpression.NullVal) {
@ -202,7 +202,7 @@ abstract class AbstractApexNode extends AbstractNode<AbstractApexNode, ApexNode<
*
* See: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_primitives.htm
*/
public static String caseNormalizedTypeIfPrimitive(String name) {
static String caseNormalizedTypeIfPrimitive(String name) {
String floor = caseNormalizedTypeNames.floor(name);
return name.equalsIgnoreCase(floor) ? floor : name;
}