You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Declaring variables in a class and applying multiple variables results in variables not being converted to corresponding values in the output result
#177
public class StaticURI {
public final static String version3 = "/service/license/version3";
private final static String SERVICE_OPERATION = "service";
private final static String SERVICE = "/" + SERVICE_OPERATION;
public final static String version4 = SERVICE + "/pmts/convert/update";
}
// QDox构建器
JavaProjectBuilder javaProjectBuilder = new JavaProjectBuilder();
javaProjectBuilder.setEncoding(StandardCharsets.UTF_8.name());
public class StaticURI {
public final static String version3 = "/service/license/version3";
}
// QDox构建器
JavaProjectBuilder javaProjectBuilder = new JavaProjectBuilder();
javaProjectBuilder.setEncoding(StandardCharsets.UTF_8.name());
if ("com.test.controller.StaticURI".equals(javaClass.getFullyQualifiedName())) {
System.err.println("字段\t" + javaClass.getFields());
List f = javaClass.getFields();
f.forEach(fieldRef->{
System.out.println(fieldRef.getName());
String h = fieldRef.getInitializationExpression();
System.out.println("--" + h);
});
}
}
result::::
字段 [public static final String com.test.controller.StaticURI.version3, private static final String com.test.controller.StaticURI.SERVICE_OPERATION, private static final String com.test.controller.StaticURI.SERVICE, public static final String com.test.controller.StaticURI.version4]
version3
--"/service/license/version3"
SERVICE_OPERATION
--"service"
SERVICE
--"/" + SERVICE_OPERATION
version4
--SERVICE + "/pmts/convert/update"
The text was updated successfully, but these errors were encountered: