public void addFieldDeclarations (JavaClassRep classRep) {
String literalName = getSymbol();
if (literal instanceof BigInteger) {
if (unboxedUseCount > 0) {
JavaFieldDeclaration unboxedDeclaration = new JavaFieldDeclaration(Modifier.STATIC | Modifier.PRIVATE | Modifier.FINAL, JavaTypeName.make(literal.getClass()), literalName + "$U", constructorExpression);
classRep.addFieldDeclaration(unboxedDeclaration);
if (boxedUseCount > 0) {
JavaExpression initializer = SCJavaDefn.createPrimitiveMakeInvocation(getKernelTypeClass(), new JavaField.Static(classRep.getClassName(), literalName + "$U", JavaTypeName.make(literal.getClass())));
JavaFieldDeclaration boxedDeclaration = new JavaFieldDeclaration(Modifier.STATIC | Modifier.PRIVATE | Modifier.FINAL, JavaTypeName.make(getKernelTypeClass()), literalName, initializer);
classRep.addFieldDeclaration(boxedDeclaration);
}
} else
if (boxedUseCount > 0) {
JavaExpression initializer = SCJavaDefn.createPrimitiveMakeInvocation(getKernelTypeClass(), constructorExpression);
JavaFieldDeclaration boxedDeclaration = new JavaFieldDeclaration(Modifier.STATIC | Modifier.PRIVATE | Modifier.FINAL, JavaTypeName.make(getKernelTypeClass()), literalName, initializer);
classRep.addFieldDeclaration(boxedDeclaration);
}
} else if (boxedUseCount > 0) {
// kernel type class: something like: "org.openquark.cal.internal.runtime.lecc.RTData$CAL_Integer";
JavaExpression initializer = SCJavaDefn.createPrimitiveMakeInvocation(getKernelTypeClass(), constructorExpression);
JavaFieldDeclaration instanceDeclaration = new JavaFieldDeclaration(Modifier.STATIC | Modifier.PRIVATE | Modifier.FINAL, JavaTypeName.make(getKernelTypeClass()), literalName, initializer);
classRep.addFieldDeclaration(instanceDeclaration);
}
}