<html><head><style>
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst, p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle, p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
}
</style></head><body><div style="font-family:Calibri,'Segoe UI',Meiryo,'Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic','Khmer UI','Nirmala UI',Tunga,'Lao UI',Ebrima,sans-serif;font-size:16px">
<div>If you need to initialize a [STRICT] PRIVATE CLASS VAR you need to do this in a CLASS CONSTRUCTOR (similarly finalizations will need a CLASS DESTRUCTOR). You can expose it thru a read-only CLASS PROPERTY, but there is no way to make it a real constant (as long as you can access the variable itself, you can modify it).</div>
<div><div> </div><div>-- <br>Best regards,<br>JC Chu</div><div> </div></div> <div style="border-top-color:rgb(225,225,225);border-top-width:1px;border-top-style:solid"> <strong>From:</strong> bsquared <<a href="mailto:bwcode4u@gmail.com">bwcode4u@gmail.com</a>><br>
<strong>Sent:</strong> November 7, 2012 9:37<br> <strong>To:</strong> <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a><br> <strong>Subject:</strong> [fpc-pascal] Questions About Porting Java and Extended Class Syntax Features<br>
</div> <div> </div>Hello,<br>
<br>
I am looking into porting Java to Free Pascal. I have some confusion about how to port certain types of Java Lang Features.<br>
<br>
What is the best way to port 'private static final' member?<br>
I was thinking the extended class syntax would cover this, but I dont it will work for a scenario like this:<br>
<br>
private static final ObjectMapper mapper = new ObjectMapper();<br>
<br>
or<br>
<br>
private static final Set<String> = STATIC_SET;<br>
static {<br>
STATIC_SET = new HashSet<String>;<br>
STATIC_SET.Add("A Value");<br>
...<br>
}<br>
<br>
Any insight you may have is appreciated.<br>
<br>
Thank you.<font color="#888888"><br>
<br>
-- <br>
Regards,<br>
Brian<br>
<br>
______________________________<u></u>_________________<br>
fpc-pascal maillist - <a tabindex="-1" href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.<u></u>org</a><br>
<a tabindex="-1" href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/<u></u>mailman/listinfo/fpc-pascal</a><br>
</font></div></body></html>