001/****************************************************************************
002 * Copyright/Copyleft:
003 *
004 * For this source the LGPL Lesser General Public License,
005 * published by the Free Software Foundation is valid.
006 * It means:
007 * 1) You can use this source without any restriction for any desired purpose.
008 * 2) You can redistribute copies of this source to everybody.
009 * 3) Every user of this source, also the user of redistribute copies
010 *    with or without payment, must accept this license for further using.
011 * 4) But the LPGL is not appropriate for a whole software product,
012 *    if this source is only a part of them. It means, the user
013 *    must publish this part of source,
014 *    but don't need to publish the whole source of the own product.
015 * 5) You can study and modify (improve) this source
016 *    for own using or for redistribution, but you have to license the
017 *    modified sources likewise under this LGPL Lesser General Public License.
018 *    You mustn't delete this Copyright/Copyleft inscription in this source file.
019 *
020 * @author Hartmut Schorrig: hartmut.schorrig@vishia.de, www.vishia.org
021 * @version 0.93 2011-01-05  (year-month-day)
022 *******************************************************************************/ 
023package org.vishia.java2C;
024
025import java.io.FileNotFoundException;
026import java.io.IOException;
027import java.text.ParseException;
028
029/**This class contains all standard types. It is instanciated as singleton. 
030 * Most of its members are static. 
031 * Though most of types are searched in its {@link LocalIdents#getType(String, LocalIdents)}
032 * in the adequate context, some types should be known via direct access. That are standard types.
033 * The references to that standard types are defined here. The type information are read from its stc file,
034 * therefore stored in {@link #stdTypes} and then gotten from {@link #stdTypes}.{@link LocalIdents#getType(String, LocalIdents)}.
035 * <br><br>
036 * TODO handle all non-primitive types with stc files. Only primitive types are static declared here.
037 * 
038 */
039public final class CRuntimeJavalikeClassData
040{
041
042  /**Version, history and license.
043   * <ul>
044   * <li>2014-09-05 Hartmut chg: clazz_MemC removed, was twice with clazzMemC
045   * <li>2014-09-05 Hartmut new: {@link #clazzCharsetJc} necessary for {@link #clazzStringJc} 
046   * <li>2014-09-05 Hartmut new: {@link #field_byteM} is a PtrVal_int8, used in <code> new String(@Java4C.PtrVal byte[], ...</code> 
047   * <li>2014-09-05 Hartmut new: Definition of <code>javaSrcPkgNio</code> and <code>javaSrcPkgCharset</code> in the standard package tree. 
048   * <li>2014-09-05 Hartmut new: read {@link #clazzCharsetJc} via its stc-file <code>Jc/CharsetJc.stc</code>. 
049   *   This is an alternative instead definition of their methods in this class. It may be better to read all definitions from a textual file, not hard coded.
050   * <li>2014-09-05 Hartmut chg: Using of method {@link JavaSrcTreePkg#setFileAndReadStcFile(String, org.vishia.java2C.ConfigSrcPathPkg_ifc.Set, String)}
051   *   for some types which's stc-files should be read here, instead calling {@link JavaSrcTreePkg#putClassType(ClassData)} 
052   *     after {@link JavaSrcTreePkg#setFileJava(String, java.io.File, String, org.vishia.java2C.ConfigSrcPathPkg_ifc.Set, String, boolean)}. It is only one operation.
053   * <li>2014-09-05 Hartmut adapt: removed arguments from {@link JavaSrcTreePkg#setFileJava(String, java.io.File, String, org.vishia.java2C.ConfigSrcPathPkg_ifc.Set, String, boolean)} 
054   * 
055   * <li>2014-08-17 Hartmut new: read Jc/ObjectJc.stc via requesting type CharSequence and Jc/FileIoJc.src via requesting type java.io.File. 
056   *   TODO: All complex Types of CRuntimeJavalike should be read from stc files initially in this class on startup. 
057   * <li>2013-10-01 added va_list.size() and String.toString() in standard types 
058   * <li>2012-08-00 Preparing standard files are loaded here but there info is contained in stc file.
059   * <li>2011-00-00 Some more info in stc-files
060   * <li>2008-09-00 Created.
061   * </ul>
062   * <br><br>
063   * <b>Copyright/Copyleft</b>:
064   * For this source the LGPL Lesser General Public License,
065   * published by the Free Software Foundation is valid.
066   * It means:
067   * <ol>
068   * <li> You can use this source without any restriction for any desired purpose.
069   * <li> You can redistribute copies of this source to everybody.
070   * <li> Every user of this source, also the user of redistribute copies
071   *    with or without payment, must accept this license for further using.
072   * <li> But the LPGL is not appropriate for a whole software product,
073   *    if this source is only a part of them. It means, the user
074   *    must publish this part of source,
075   *    but don't need to publish the whole source of the own product.
076   * <li> You can study and modify (improve) this source
077   *    for own using or for redistribution, but you have to license the
078   *    modified sources likewise under this LGPL Lesser General Public License.
079   *    You mustn't delete this Copyright/Copyleft inscription in this source file.
080   * </ol>
081   * If you are intent to use this sources without publishing its usage, you can get
082   * a second license subscribing a special contract with the author. 
083   * 
084   * @author Hartmut Schorrig = hartmut.schorrig@vishia.de
085   * 
086   */
087  public static final String sVersion = "2014-09-05"; 
088
089  
090  
091  
092  /**The singleton association will be set as first operation in the constructor.
093   * It means, the instance is available, if it is firstly created. 
094   * A null-check ensures, that the constructor is called only one time.
095   */
096  public static CRuntimeJavalikeClassData singleton;
097  
098  /**Base of all types contained in {@link LocalIdents} and therefore {@link ClassData},
099   * which are defined in {@link Java2C_Main.CRuntimeJavalikeClassData}. This types and identifier
100   * are accessible in all scopes. See also {@link #userTypes}.
101   */
102  public final LocalIdents stdTypes;
103
104  /**This class is used for unknown types for auto-declaration of methods, 
105   * which are called but not found in translated sources or *.stc-files. */
106  public final static ClassData clazz_unknown = new ClassData("CRuntimeJavalike-std", "", "void","void", "V", '.', "stdarg", '?', "+final+unknown+primitive+");
107  
108  /**This type identifies a place-holder for variable arguments. */
109  public final static ClassData clazz_va_argRaw = new ClassData("CRuntimeJavalike-std", "", "va_argRaw","va_argRaw", "v", '.', null, '$', "+final+primitive+");
110  /**This type identifies the va_list type defined in stdarg.h of standard-C. */
111  public final static ClassData clazz_va_list = new ClassData("CRuntimeJavalike-std", "org/vishia/bridgeC/", "Va_list","Va_listFW", "v", '.', "Fwc/fw_LogMessage", '$', "+final+embedded+");
112  
113  public final static ClassData clazz_void = new ClassData("CRuntimeJavalike-std", "", "void","void", "V", '.', "stdarg", '%', "+final+primitive+");
114  
115  /**Base Type represents an untyped pointer.  */
116  public final static ClassData clazz_voidPtr = new ClassData("CRuntimeJavalike-std", "", "void*","void*", "V", '.', "stdarg", '*', "+final+primitive+");
117  
118  /**Base Type represents an untyped pointer, which is volatile. This pointer can be used as argument for a CouncurrentLinkedQueue or such adequate. */
119  public final static ClassData clazz_voidVolatile = new ClassData("CRuntimeJavalike-std", "", "voidVolatilePtr","void volatile*", "V", '.', "stdarg", '*', "+final+primitive+");
120  
121  public final static ClassData clazz_bool = new ClassData("CRuntimeJavalike-std", "", "boolean", "bool", "b", 'Z', null, '%', "+final+primitive+");
122  public final static ClassData clazz_int8 = new ClassData("CRuntimeJavalike-std", "", "byte", "int8", "i", 'B', null, '%', "+final+primitive+");
123  public final static ClassData clazz_int16 = new ClassData("CRuntimeJavalike-std", "", "short", "int16", "i", 'S', null, '%', "+final+primitive+");
124  public final static ClassData clazz_uint16 = new ClassData("CRuntimeJavalike-std", "", "ushort", "uint16", "i", 'S', null, '%', "+final+primitive+");
125  public final static ClassData clazz_int32 = new ClassData("CRuntimeJavalike-std", "", "int", "int32", "i", 'I', null, '%', "+final+primitive+");
126  public final static ClassData clazz_int64 = new ClassData("CRuntimeJavalike-std", "", "long", "int64", "l", 'J', null, '%', "+final+primitive+");
127  public final static ClassData clazz_int = new ClassData("CRuntimeJavalike-std", "", "int", "int", "i", 'I', null, '%', "+final+primitive+");
128  public final static ClassData clazz_s0 = new ClassData("CRuntimeJavalike-std", "", "s0", "char const*", "z", 'z', null, '%', "+final+primitive+");   //String-Literal "xyz"
129  public final static ClassData clazz_char = new ClassData("CRuntimeJavalike-std", "", "char", "char", "c", 'C', null, '%', "+final+primitive+");
130  public final static ClassData clazz_float = new ClassData("CRuntimeJavalike-std", "", "float", "float", "f", 'F', null, '%', "+final+primitive+");
131  public final static ClassData clazz_double = new ClassData("CRuntimeJavalike-std", "", "double", "double", "f", 'D', null, '%', "+final+primitive+");
132  public final static ClassData clazzClassJc = new ClassData("CRuntimeJavalike-std", "java/lang/", "Class", "ClassJc", "Cl", 'L', "Jc/ReflectionJc", '*', "");
133  public final static ClassData clazzObjectJc = new ClassData("CRuntimeJavalike-std", "java/lang/", "Object", "ObjectJc", "O", 'L', "Jc/ObjectJc", '*', "");
134  public final static ClassData clazzStringJc = new ClassData("CRuntimeJavalike-std", "java/lang/", "String", "StringJc", "S", 's', "Jc/StringJc", 't', "+final+embedded+primitive+");
135  public final ClassData clazzCharsetJc;
136  public final static ClassData clazzByteStringJc = new ClassData("CRuntimeJavalike-std", "", "ByteStringJc", "ByteStringJc", "M", 'm', "Jc/StringJc", 'B', "+final+embedded+primitive+");
137  //public final static ClassData clazzAllocInBlockJc = new ClassData("CRuntimeJavalike-std", "org/vishia/bridgeC/", "AllocInBlock", "BlockHeapJc", "X", '*', "BlockHeap/BlockHeapJc", '*', "+final+embedded+primitive+");
138  
139  { //clazzClassJc.addMethod("getEnclosingClass", "getEnclosingClass", 0, clazzClassJc.classTypeInfo);
140    //clazzClassJc.addMethod("getDeclaredFields", "getDeclaredFields", 0, clazzClassJc.classTypeInfo);
141        
142  }
143  
144  { clazzObjectJc.needFinalize();  //it forces generation of finalize for all derived classes.
145        clazzObjectJc.addMethod("clone", "clone", Method.modeOverrideable, clazzObjectJc.classTypeInfo);
146    clazzObjectJc.addMethod("equals", "equals", Method.modeOverrideable, clazz_bool.classTypeInfo, new ClassData[]{clazzObjectJc} );
147    clazzObjectJc.addMethod("finalize", "finalize", Method.modeOverrideable, clazz_void.classTypeInfo);
148    clazzObjectJc.addMethod("hashCode", "hashCode", Method.modeOverrideable, clazz_int32.classTypeInfo);
149    clazzObjectJc.addMethod("toString", "toString", Method.modeOverrideable, clazzStringJc.classTypeInfo);
150    clazzObjectJc.addMethod("wait", "waitInfinity", 0, clazz_void.classTypeInfo);
151    clazzObjectJc.addMethod("wait", "wait", 0, clazz_void.classTypeInfo, new ClassData[]{clazz_int32} );
152    clazzObjectJc.addMethod("notify", "notify", 0, clazz_void.classTypeInfo);
153    clazzObjectJc.addMethod("getClass", "getClass", Method.modeNoThCxt, clazzClassJc.classTypeInfo);
154    clazzObjectJc.completeInheritanceWithOwnMethods();
155  }
156  ///
157  //public final static ClassData clazzExceptionJc  = new ClassData("CRuntimeJavalike-std", "java/lang/", "Exception", "ExceptionJc", "Exc", 'x', "Fwc/fw_Exception", '*', "");
158  public final ClassData clazzExceptionJc; //  = new ClassData("CRuntimeJavalike-std", "java/lang/", "Exception", "ExceptionJc", "Exc", 'x', "Fwc/fw_Exception", '*', "");
159  
160  
161  /**All classes which are defined by stc-files in CRuntimeJavalike: */
162  //public final ClassData clazzStringBuilderJc; // = new ClassData("CRuntimeJavalike-std", "java/lang/", "StringBuilder", "StringBuilderJc", "Sb", 'b', "Jc/StringBuilderJc", '*', "+thx++ObjectJc+");
163  //public final ClassData clazzIntegerJc;
164  
165  
166  
167  
168  //public final ClassData clazzLogMessageFW; // = new ClassData("CRuntimeJavalike-std", "org/vishia/util/", "LogMessage", "LogMessageFW_i", "LogM", 'L', "Fwc/fw_LogMessage", '*', "+final+ObjectJc+");
169  public final ClassData clazzLogMessageStream = new ClassData("CRuntimeJavalike-std", "org/vishia/msgDispatch/", "LogMessageStream", "LogMessageStream_FW", "Logs", 'L', "Fwc/fw_LogMessage", '*', "+final++ObjectJc+");
170  public final ClassData clazzVaArgBuffer = new ClassData("CRuntimeJavalike-std", "org/vishia/bridgeC/", "VaArgBuffer", "VaArgBuffer", "Vargb", 'L', "MsgDisp/VaArgBuffer", '*', "+final+");
171  //public final ClassData clazzInteger = new ClassData("CRuntimeJavalike-std", "java/lang/", "Integer", "IntegerJc", "Intg", 'L', "Jc/ObjectJc", '*', "");
172  //public final ClassData clazzDouble = new ClassData("CRuntimeJavalike-std", "java/lang/", "Double", "DoubleJc", "Double", 'L', "Jc/ObjectJc", '*', "");
173  //public final ClassData clazzMath = new ClassData("CRuntimeJavalike-std", "java/lang/", "Math", "MathJc", "Math", 'L', "Jc/ObjectJc", '*', "");
174  //public final ClassData clazzArrays = new ClassData("CRuntimeJavalike-std", "java/util/", "Arrays", "ArraysJc", "Arrays", 'L', "Jc/ArraysJc", '*', "");
175  //public final ClassData clazzDate = new ClassData("CRuntimeJavalike-std", "java/util/", "Date", "DateJc_s", "Date", 'L', "Jc/DateJc", '*', "+ObjectJc+");
176  //public final ClassData clazzSimpleDateFormat = new ClassData("CRuntimeJavalike-std", "java/text/", "SimpleDateFormat", "SimpleDateFormatJc_s", "Dateformat", 'L', "Jc/DateJc", '*', "+ObjectJc+");
177  public final ClassData clazzTextFieldPositionJc = new ClassData("CRuntimeJavalike-std", "java/text/", "FieldPosition", "TextFieldPositionJc_s", "FieldPos", 'L', "Jc/DateJc", '*', "+ObjectJc+");
178  //public final ClassData clazzFormatterJc = new ClassData("CRuntimeJavalike-std", "java/util/", "Formatter", "FormatterJc_s", "Fm", 'L', "Jc/FormatterJc", '*', "+ObjectJc+");
179  public final ClassData clazzListJc = new ClassData("CRuntimeJavalike-std", "java/util/", "List", "ListJc", "Li", 'L', "Jc/ListJc", '*', "");
180  public final ClassData clazzIteratorJc = new ClassData("CRuntimeJavalike-std", "java/util/", "Iterator", "IteratorJc", "Iter", 'L', "Jc/ListJc", '*', "");
181  public final ClassData clazzCollectionJc = new ClassData("CRuntimeJavalike-std", "java/util/", "Collection", "CollectionJc", "Collect", 'L', "Jc/ListJc", '*', "");
182  //public final ClassData clazzConcurrentLinkedQueue = new ClassData("CRuntimeJavalike-std", "java/util/", "ConcurrentLinkedQueue", "ConcurrentLinkedQueueJc", "Clq", 'L', "Jc/ConcurrentLinkedQueueJc", '*', "");
183
184  //public final ClassData clazzThreadJc = new ClassData("CRuntimeJavalike-std", "java/lang/", "Thread", "ThreadJc", "Th", 'L', "Jc/ThreadJc", '*', "");
185
186  
187  public final ClassData clazzMemC = new ClassData("CRuntimeJavalike-std", "org/vishia/bridgeC/", "MemC", "MemC", "M", 'm', "Fwc/fw_MemC", '$', "+final+embedded+xxxprimitive+");
188  //public final ClassData clazzOS_TimeStamp = new ClassData("CRuntimeJavalike-std", "org/vishia/bridgeC/", "OS_TimeStamp", "OS_TimeStamp", "t", 't', "OSAL/inc/os_time", '$', "+final+embedded+xxxprimitive+");
189  
190  //public final ClassData clazzSystemJc = new ClassData("CRuntimeJavalike-std", "java/lang/", "System", "SystemJc", "System", 'L', "Jc/SystemJc", '*', "+final+");
191    
192  //public final ClassData clazzPrintStreamJc = new ClassData("CRuntimeJavalike-std", "java/io/", "PrintStream", "PrintStreamJc", "PrintSt", 'L', "Jc/SystemJc", '*', "+final+");
193  //public final ClassData clazzFileWriterJc = new ClassData("CRuntimeJavalike-std", "java/io/", "FileWriter", "FileWriterJc_s", "fWr", 'L', "Jc/FileIoJc", '*', "+ObjectJc+");
194
195  public static final FieldData fieldObjectJc = new FieldData("ObjectJc", clazzObjectJc, null, null, null, '.', '*', 0, null, '.', null);
196  
197  
198  
199  /**Typical 1-param arrays. */
200  private final ClassData[] param_s0 = { clazz_s0};
201  private final ClassData[] param_int8 = { clazz_int8};
202  private final ClassData[] param_int16 = { clazz_int16};
203  private final ClassData[] param_int = { clazz_int};
204  private final ClassData[] param_int32 = { clazz_int32};
205  private final ClassData[] param_char = { clazz_char};
206  private final ClassData[] paramStringJc = { clazzStringJc};
207  private final ClassData[] param_float = { clazz_float};
208  private final ClassData[] param_double = { clazz_double};
209  
210  //private final FieldData field_voidP = new FieldData("void", clazz_void, '.', '*', 0, null, '.', null);
211  //private final FieldData field_raw = new FieldData("raw", clazz_void, null, null, null, '.', '%', 0, null, '.', null);
212  private final FieldData field_boolean = new FieldData("boolean", clazz_bool, null, null, null, '.', '%', 0, null, '.', null);
213  private final FieldData field_int = new FieldData("int", clazz_int, null, null, null, '.', '%', 0, null, '.', null);
214  private final FieldData field_int16 = new FieldData("int", clazz_int16, null, null, null, '.', '%', 0, null, '.', null);
215  private final FieldData field_int32 = new FieldData("int", clazz_int32, null, null, null, '.', '%', 0, null, '.', null);
216  private final FieldData field_int64 = new FieldData("int", clazz_int64, null, null, null, '.', '%', 0, null, '.', null);
217
218  //public final FieldData ident_byte_AY = new FieldData("byte_AY", clazz_int8, '.', '%', 1, null, '%', clazz_int8); 
219  private final FieldData field_byteY = new FieldData("int", clazz_int8, null, null, null, '.', 'X', 1, null, '%', null);
220  private final FieldData field_byteM = new FieldData("int", clazz_int8, null, null, null, '.', 'M', 1, null, '%', null);
221  private final FieldData field_intY  = new FieldData("int", clazz_int32, null, null, null,  '.', 'X', 1, null, '%', null);
222  private final FieldData field_longY  = new FieldData("long", clazz_int64, null, null, null,  '.', 'X', 1, null, '%', null);
223  private final FieldData field_charY = new FieldData("char", clazz_char, null, null, null, '.', 'X', 1, null, '%', null);
224  private final FieldData fieldStringJc = new FieldData("StringJc", clazzStringJc, null, null, null, '.', 't', 0, null, '.', null);
225  private final FieldData fieldz0 = new FieldData("char const*", clazz_s0, null, null, null, '.', 't', 0, null, '.', null);
226  private final FieldData fieldStringJcNonPersist = new FieldData("StringJc", clazzStringJc, null, null, null, 'r', 't', 0, null, '.', null);
227  private final FieldData fieldObjectY = new FieldData("ObjectJc", clazzObjectJc, null, null, null, '.', 'X', 1, null, '*', null);
228  
229  /**This field type identifies a place-holder for variable arguments. */
230  public final FieldData field_va_argRaw = clazz_va_argRaw.classTypeInfo; 
231  
232  /**The type MemC is used in C only as embedded type. */
233  private final FieldData field_MemC = new FieldData("MemC", clazzMemC, null, null, null, '.', '$', 0, null, '.', null);
234  //private final FieldData fieldOS_TimeStamp = new FieldData("OS_TimeStamp", clazzOS_TimeStamp, null, null, null, '.', '$', 0, null, '.', null);
235
236  public final Method methodASSERT = new Method(null, null, "assert", "assert", "ASSERT", null, Method.modeNoThCxt + Method.modeStatic, field_boolean, null, null, "");
237  
238  public final FieldData field_int_va_arg = new FieldData("int_va_arg", clazz_int, null, null, null, '.', '$', 1, null/*new String[]{"11"}*/, '$', null);
239  
240  class PkgReplacementInfo implements ConfigSrcPathPkg_ifc.Set{
241
242        private final String filePrefix, fileSuffix, namePrefix, nameSuffix, sStcFile;
243        
244        public PkgReplacementInfo(String filePrefix, String fileSuffix,
245                                String namePrefix, String nameSuffix, String sStcFile) {
246                        super();
247                        this.filePrefix = filePrefix;
248                        this.fileSuffix = fileSuffix;
249                        this.namePrefix = namePrefix;
250                        this.nameSuffix = nameSuffix;
251                        this.sStcFile = sStcFile;
252                
253                }
254
255                @Override       public String getFilePrefix() { return filePrefix; }
256                
257                @Override       public String getFileSuffix() { return fileSuffix; }
258
259                @Override       public String getNamePrefix() { return namePrefix; }
260
261                @Override       public String getNameSuffix() { return nameSuffix; }
262        
263                @Override public String getInputPath() { return null; }
264
265                @Override
266                public String getStcFile() {
267                        return sStcFile;
268                }
269
270                @Override public String toString(){ 
271                        return "@PkgReplacementInfo: " 
272                        + filePrefix + (fileSuffix !=null ? "*" + fileSuffix : "") 
273                        + "(" + namePrefix + "*" + nameSuffix
274                        + (sStcFile != null ? ", stc=" + sStcFile : "")
275                        + ")";
276                }
277
278  }
279  
280  
281  ConfigSrcPathPkg_ifc.Set pkgInfoJc = new PkgReplacementInfo("Jc/", "Jc", "","Jc", null); 
282  /**The replace info for all Java-types, which are defined in Jc/ObjectJc.h respectively Jc/ObjectJc.stc. */
283  ConfigSrcPathPkg_ifc.Set pkgInfoObjectJc = new PkgReplacementInfo("Jc/ObjectJc", null, "","Jc", null); //Note: The 2. parameter suffixFile is null, The prefixFile is the filename.
284  ConfigSrcPathPkg_ifc.Set pkgInfoFileIoJc = new PkgReplacementInfo("Jc/FileIoJc", null, "","Jc", null); //Note: The 2. parameter suffixFile is null, The prefixFile is the filename.
285  ConfigSrcPathPkg_ifc.Set pkgInfoFwException = new PkgReplacementInfo("Fwc/fw_Exception", null, "","Jc", null); //Note: The 2. parameter suffixFile is null, The prefixFile is the filename.
286  ConfigSrcPathPkg_ifc.Set pkgInfoFwc = new PkgReplacementInfo("Fwc/fw_", "", "","Fwc", null); 
287  ConfigSrcPathPkg_ifc.Set pkgInfoBridgeC = new PkgReplacementInfo("Jc/bridgeC", "", null,"", null); 
288  
289//Java2C_Main.singleton.javaSources
290  JavaSrcTreePkg javaSrcPkgOrg =           Java2C_Main.getOrAddRootPkg("org");
291  JavaSrcTreePkg javaSrcPkgVishia =        javaSrcPkgOrg.getOrAddPkg("org/vishia/", "vishia", null);
292  JavaSrcTreePkg javaSrcPkgVishiaMsgDispatch = javaSrcPkgVishia.getOrAddPkg("org/vishia/msgDispatch/", "msgDispatch", null);
293  JavaSrcTreePkg javaSrcPkgVishiaUtil =    javaSrcPkgVishia.getOrAddPkg("org/vishia/util/", "util", null);
294  JavaSrcTreePkg javaSrcPkgVishiaBridgeC = javaSrcPkgVishia.getOrAddPkg("org/vishia/bridgeC/", "bridgeC", null); //pkgInfoBridgeC);
295  
296
297  
298  
299  CRuntimeJavalikeClassData(RunRequiredFirstPass_ifc runRequiredFirstPass) 
300  throws FileNotFoundException, IllegalArgumentException, IOException, IllegalAccessException, InstantiationException, ParseException
301  { 
302    
303    assert(CRuntimeJavalikeClassData.singleton == null);
304    CRuntimeJavalikeClassData.singleton = this;  //now CRuntimeJavalike.singleton.stdTypes are able to access.
305    
306    /**Create the package for java.lang and java.util and add JavaSrc in the package tree,
307     * which have its representation with stc-files. The stc-Files will be translated if the types are needed.
308     */
309    //JavaSrcTreePkg javaSrcPkgJavaStd = new JavaSrcTreePkg("java/", "java");
310    JavaSrcTreePkg javaSrcPkgJavaStd = Java2C_Main.getOrAddRootPkg("java");
311    
312    JavaSrcTreePkg javaSrcPkgLang = javaSrcPkgJavaStd.getOrAddPkg("java/lang/", "lang", null);
313    stdTypes = javaSrcPkgLang.getPkgLevelIdents();
314    
315    //stdTypes.putClassType("java", javaSrcPkgJavaStd);
316    
317    stdTypes.putClassType(clazz_void);
318    stdTypes.putClassType(clazz_voidVolatile);
319    stdTypes.putClassType(clazz_bool);
320    stdTypes.putClassType(clazz_int32);
321    stdTypes.putClassType(clazz_s0);
322    
323    clazz_uint16.addCastFromType(clazz_int8, "?", "%%");
324    clazz_int16.addCastFromType(clazz_int8, "?", "%%");
325    
326    clazz_char.addCastFromType(clazz_int8, "((char)(?))", "%%");
327    clazz_char.addCastFromType(clazz_int16, "((char)(?))", "%%");
328    clazz_char.addCastFromType(clazz_uint16, "((char)(?))", "%%");
329    
330    clazz_int32.addCastFromType(clazz_int8, "?", "%%");
331    clazz_int32.addCastFromType(clazz_int16, "?", "%%");
332    clazz_int32.addCastFromType(clazz_uint16, "?", "%%");
333    clazz_int32.addCastFromType(clazz_int, "?", "%%");
334    
335    clazz_int.addCastFromType(clazz_int8, "?", "%%");
336    clazz_int.addCastFromType(clazz_int16, "?", "%%");
337    clazz_int.addCastFromType(clazz_uint16, "?", "%%");
338    clazz_int.addCastFromType(clazz_int32, "?", "%%");
339    
340    clazz_int64.addCastFromType(clazz_int8, "?", "%%");
341    clazz_int64.addCastFromType(clazz_uint16, "?", "%%");
342    clazz_int64.addCastFromType(clazz_int16, "?", "%%");
343    clazz_int64.addCastFromType(clazz_int32, "?", "%%");
344    clazz_int64.addCastFromType(clazz_int32, "?", "%%");
345    
346    clazz_float.addCastFromType(clazz_int8, "?", "%%");
347    clazz_float.addCastFromType(clazz_uint16, "?", "%%");
348    clazz_float.addCastFromType(clazz_int16, "?", "%%");
349    clazz_float.addCastFromType(clazz_int32, "?", "%%");  //lesser significant digits
350    clazz_float.addCastFromType(clazz_int64, "?", "%%");
351    
352    clazz_double.addCastFromType(clazz_int8, "?", "%%");
353    clazz_double.addCastFromType(clazz_uint16, "?", "%%");
354    clazz_double.addCastFromType(clazz_int16, "?", "%%");
355    clazz_double.addCastFromType(clazz_int32, "?", "%%");
356    clazz_double.addCastFromType(clazz_int64, "?", "%%");
357    clazz_double.addCastFromType(clazz_float, "?", "%%");
358    
359    
360    stdTypes.putClassType("long", "int64", clazz_int64, "%", null);
361    
362    stdTypes.putClassType("short", "int16", clazz_int16, "%", null);
363    stdTypes.putClassType(clazz_uint16);
364    stdTypes.putClassType("byte", "int8", clazz_int8, "%", null);
365    stdTypes.putClassType("float", "float", clazz_float, "%", null);
366    stdTypes.putClassType("double", "double", clazz_double, "%", null);
367    stdTypes.putClassType("char", "char", clazz_char, "%", null);
368    //stdTypes.putClassTypeStandard(clazzClassJc);
369    stdTypes.putClassTypeStandard(clazzObjectJc);
370    stdTypes.putClassType(clazz_va_argRaw);
371    javaSrcPkgVishiaBridgeC.putClassType(clazz_va_argRaw);
372    { /**NOTE: get() isn't a method, it is the access immediately. In Java a method is necessary: */
373      clazz_va_list.addMethod("get", "!", Method.modeNoThCxt, clazz_va_list.classTypeInfo);
374      clazz_va_list.addMethod("size", "size", Method.modeNoThCxt, clazz_int32.classTypeInfo);
375      javaSrcPkgVishiaBridgeC.putClassType(clazz_va_list);
376    }
377    ///
378    /*
379    { clazzExceptionJc.addMethod("getMessage", "getMessage", 0, clazzStringJc.classTypeInfo);
380      clazzExceptionJc.addMethod("printStackTrace", "printStackTrace", 0, clazz_void.classTypeInfo);
381      clazzExceptionJc.addMethod("printStackTrace", "printStackTrace_P", 0, clazz_void.classTypeInfo, new ClassData[]{clazzObjectJc});
382      clazzExceptionJc.addMethod("ctorM", "ctorM", 0, clazzExceptionJc.classTypeInfo, paramStringJc);
383        //clazzExceptionJc.addMethod("printStackTrace", "printStackTrace_", 0, clazz_void.classTypeInfo);
384        stdTypes.putClassType("Exception", clazzExceptionJc);
385    }
386    */
387    stdTypes.putClassTypeStandard(clazzStringJc);
388    stdTypes.putClassTypeStandard(clazzByteStringJc);
389
390    
391
392    
393    //Adds all standard java classes, this classes have its stc-File in CRuntimeJavalike.
394    //Then only the standard classes are known without declaration 'java/lang'
395    //javaSrcPkgLang.setFileJava(null, null, "*.java", pkgInfoJc, "Jc/", "Jc", "","Jc", null, false);
396    ////
397    JavaSrcTreePkg javaSrcPkgNio = javaSrcPkgJavaStd.getOrAddPkg("java/nio/", "nio", null);
398    JavaSrcTreePkg javaSrcPkgCharset = javaSrcPkgNio.getOrAddPkg("java/nio/charset/", "charset", null);
399    clazzCharsetJc = javaSrcPkgCharset.setFileAndReadStcFile("Charset", pkgInfoJc, "Jc/CharsetJc.stc");
400    
401    //This statement forces reading the Jc/ObjectJc.stc because the class CharSequence is defined there. 
402    javaSrcPkgLang.setFileAndReadStcFile("CharSequence", pkgInfoObjectJc, null);
403    { //get a type from that file to read the file and set all others.
404      //No more necessary, done from setFileAndReadStcFile:
405      //stdTypes.getType("CharSequence", null);  //forces read file. 
406    
407    }
408    //The next statements does not read the stc file, they associate the Java clss with the stc file only.
409    javaSrcPkgLang.setFileJava(null, null, "Runnable.java", pkgInfoJc, null, false);
410    javaSrcPkgLang.setFileJava(null, null, "Thread.java", pkgInfoJc, null, false);
411    javaSrcPkgLang.setFileJava(null, null, "System.java", pkgInfoJc, null, false);
412    javaSrcPkgLang.setFileJava(null, null, "Math.java", pkgInfoJc, null, false);
413    
414    JavaSrcTreePkg javaSrcPkgUtil = javaSrcPkgJavaStd.getOrAddPkg("java/util/", "util", null);
415    javaSrcPkgUtil.setFileJava(null, null, "Date.java", pkgInfoJc, null, false);
416    javaSrcPkgUtil.setFileJava(null, null, "LinkedList.java", pkgInfoJc, null, false);
417    //javaSrcPkgUtil.setFileJava(null, null, "Formatter.java", pkgInfoJc, "Jc/FormatterJc.stc", false);
418    
419    javaSrcPkgUtil.setFileJava(null, null, "Arrays.java", pkgInfoJc, null, false);
420        
421    
422    
423    javaSrcPkgUtil.setFileJava(null, null, "IllegalFormatConversionException.java", pkgInfoJc, "Jc/FormatterJc.stc", false);
424    
425    
426    //
427    //JavaSrcTreeFile javaSrcStringBuffer = javaSrcPkgLang.setFileJava(null, null, "StringBuffer.java", pkgInfoJc, null, false);
428    /**Adds all standard java classes, this classes have its stc-File in CRuntimeJavalike. */
429    ///
430    javaSrcPkgLang.setFileJava(null, null, "Exception.java", pkgInfoFwException, null, false);
431    clazzExceptionJc = stdTypes.getType("Exception", null); 
432    javaSrcPkgLang.setFileJava(null, null, "RuntimeException.java", pkgInfoFwException, null, false);
433    javaSrcPkgLang.setFileJava(null, null, "ClassCastException.java", pkgInfoFwException, null, false);
434    javaSrcPkgLang.setFileJava(null, null, "NullPointerException.java", pkgInfoFwException, null, false);
435    javaSrcPkgLang.setFileJava(null, null, "IndexOutOfBoundsException.java", pkgInfoFwException, null, false);
436    javaSrcPkgLang.setFileJava(null, null, "ArrayIndexOutOfBoundsException.java", pkgInfoFwException, null, false);
437    javaSrcPkgLang.setFileJava(null, null, "StringIndexOutOfBoundsException.java", pkgInfoFwException, null, false);
438    javaSrcPkgLang.setFileJava(null, null, "ArrayStoreException.java", pkgInfoFwException, null, false);
439    javaSrcPkgLang.setFileJava(null, null, "IllegalArgumentException.java", pkgInfoFwException, null, false);
440    javaSrcPkgLang.setFileJava(null, null, "NoSuchFieldException.java", pkgInfoFwException, null, false);
441    javaSrcPkgLang.setFileJava(null, null, "NoSuchMethodException.java", pkgInfoFwException, null, false);
442    javaSrcPkgLang.setFileJava(null, null, "IllegalStateException.java", pkgInfoFwException, null, false);
443    javaSrcPkgUtil.setFileJava(null, null, "IllegalFormatPrecisionException.java", pkgInfoFwException, null, false);
444    javaSrcPkgUtil.setFileJava(null, null, "IllegalFormatConversionException.java", pkgInfoFwException, null, false);
445    
446    javaSrcPkgLang.setFileJava(null, null, "Float.java", pkgInfoObjectJc,  null, false);
447    
448    JavaSrcTreePkg javaSrcPkgIO = javaSrcPkgJavaStd.getOrAddPkg("java/io/", "io", null);
449    javaSrcPkgIO.setFileAndReadStcFile("File", pkgInfoFileIoJc, null);
450    javaSrcPkgIO.setFileJava(null, null, "FileDescriptor.java", pkgInfoFileIoJc, null, false);
451    javaSrcPkgIO.setFileJava(null, null, "OutputStream.java", pkgInfoFileIoJc, null, false);
452    javaSrcPkgIO.setFileJava(null, null, "FileOutputStream.java", pkgInfoFileIoJc, null, false);
453    javaSrcPkgIO.setFileJava(null, null, "IOException.java", pkgInfoFwException, null, false);
454    javaSrcPkgIO.setFileJava(null, null, "FileNotFoundException.java", pkgInfoFwException, null, false);
455    javaSrcPkgIO.setFileJava(null, null, "UnsupportedEncodingException.java", pkgInfoFwException, null, false);
456    //
457    JavaSrcTreePkg javaSrcPkgText = javaSrcPkgJavaStd.getOrAddPkg("java/text/", "text", null);
458    javaSrcPkgText.setFileJava(null, null, "ParseException.java", pkgInfoFwException, null, false);
459    //
460    
461    
462    //The functionality of the java-file FileSystem.java is described in the Jc/FileSystemJc.stc, and the headerfile Jc/FileSystemJc is used.
463    javaSrcPkgVishiaUtil.setFileJava(null, null, "FileSystem.java", pkgInfoJc, null, false);
464    
465    //The file ConcurrentLinkedQueue is contained as an derived class in org/vishia/bridgC:
466    //javaSrcPkgVishiaBridgeC.setFileJava(null, null, "ConcurrentLinkedQueue.java", pkgInfoJc, "Jc/", "Jc", "", "Jc", null, false);
467    
468
469    
470    
471    
472    javaSrcPkgLang.setFileAndReadStcFile("StringBuffer", pkgInfoJc, "Jc/StringBufferJc.stc");
473    javaSrcPkgLang.setFileAndReadStcFile("StringBuilder", pkgInfoJc, "Jc/StringBuilderJc.stc");
474    
475    /**Initializes all classes which are defined by stc-files in CRuntimeJavalike: */
476    {
477    }  
478    
479    //stdTypes.putClassType("LinkedList", "LinkedListJc", null, "@", null);
480    
481    //stdTypes.putClassType("List", "LinkedListJc", clazzListJc, "@", null);
482    clazzListJc.addMethod("add", "add_Collection", clazz_int32.classTypeInfo, new ClassData[]{clazz_int32, clazzObjectJc});
483    clazzListJc.addMethod("add", "add", clazz_int32.classTypeInfo, new ClassData[]{});
484    clazzListJc.addMethod("addAll", "addAll", clazz_int32.classTypeInfo, new ClassData[]{clazzCollectionJc});
485    clazzListJc.addMethod("addAll", "addAll_i", clazz_int32.classTypeInfo, new ClassData[]{clazz_int32, clazzCollectionJc});
486    clazzListJc.addMethod("clear", "clear", 0, clazz_int32.classTypeInfo);
487    clazzListJc.addMethod("contains", "contains", clazz_int32.classTypeInfo, new ClassData[]{clazzObjectJc});
488    clazzListJc.addMethod("containsAll", "containsAll", clazz_int32.classTypeInfo, new ClassData[]{clazzCollectionJc});
489    clazzListJc.addMethod("equals", "equals", clazz_int32.classTypeInfo, new ClassData[]{clazzObjectJc});
490    clazzListJc.addMethod("get", "get", clazz_int32.classTypeInfo, new ClassData[]{clazz_int32});
491    clazzListJc.addMethod("hashCode", "hashCode", 0, clazz_int32.classTypeInfo);
492    clazzListJc.addMethod("indexOf", "indexOf", clazz_int32.classTypeInfo, new ClassData[]{clazzObjectJc});
493    clazzListJc.addMethod("isEmpty", "isEmpty", 0, clazz_int32.classTypeInfo);
494    clazzListJc.addMethod("iterator", "iterator", 0, clazz_int32.classTypeInfo);
495    clazzListJc.addMethod("lastIndexOf", "lastIndexOf", clazz_int32.classTypeInfo, new ClassData[]{clazzObjectJc});
496    clazzListJc.addMethod("listIterator", "listIterator", 0, clazz_int32.classTypeInfo);
497    clazzListJc.addMethod("listIterator", "listIterator_i", clazz_int32.classTypeInfo, new ClassData[]{clazz_int32});
498    clazzListJc.addMethod("remove", "remove_i", clazz_int32.classTypeInfo, new ClassData[]{clazz_int32});
499    clazzListJc.addMethod("remove", "remove_O", clazz_int32.classTypeInfo, new ClassData[]{clazzObjectJc});
500    clazzListJc.addMethod("removeAll", "removeAll", clazz_int32.classTypeInfo, new ClassData[]{clazzCollectionJc});
501    clazzListJc.addMethod("retainAll", "retainAll", clazz_int32.classTypeInfo, new ClassData[]{clazzCollectionJc});
502    clazzListJc.addMethod("set", "set", clazz_int32.classTypeInfo, new ClassData[]{clazz_int32, clazzObjectJc});
503    clazzListJc.addMethod("size", "size", 0, clazz_int32.classTypeInfo);
504    clazzListJc.addMethod("subList", "subList", clazz_int32.classTypeInfo, new ClassData[]{clazz_int32, clazz_int32});
505    clazzListJc.addMethod("toArray", "toArray", 0, clazz_int32.classTypeInfo);
506    clazzListJc.addMethod("toArray", "toArray_Array", clazz_int32.classTypeInfo, new ClassData[]{});
507    javaSrcPkgUtil.putClassType(clazzListJc);
508    
509    
510    //stdTypes.putClassType("Iterator", "IteratorJc", clazzIteratorJc, "@", null);
511    clazzIteratorJc.addMethod("hasNext", "hasNext", 0, clazz_bool.classTypeInfo);
512    clazzIteratorJc.addMethod("next", "next", 0, clazzObjectJc.classTypeInfo);
513    clazzIteratorJc.addMethod("remove", "remove", 0, clazz_void.classTypeInfo);
514    javaSrcPkgUtil.putClassType(clazzIteratorJc);
515    
516    //stdTypes.putClassType("ArrayList", "ListJc", null, "@", null);
517    //stdTypes.putClassType("LinkedList", "ArrayListJc", null, "@", null);
518    //stdTypes.putClassType("ConcurrentLinkedQueue", "ConcurrentLinkedQueueJc", null, "@", null);
519    clazz_s0.addMethod("isEmpty", "!isEmpty_s0_Fwc", Method.modeNoThCxt, clazz_bool.classTypeInfo);
520    { ClassData[] params = { clazz_int32};
521      //clazzStringJc.addMethod("append", "append_i_thcStringJc", clazzStringBuilderJc.classTypeInfo, params );
522    clazzStringJc.addMethod("new", "new_BYIICharset", 0, clazzStringJc.classTypeInfo, new FieldData[]{ field_byteY, clazz_int32.classTypeInfo, clazz_int32.classTypeInfo, clazzStringJc.classTypeInfo} );
523    clazzStringJc.addMethod("new", "new_MBYIICharset", 0, clazzStringJc.classTypeInfo, new FieldData[]{ field_byteM, clazz_int32.classTypeInfo, clazz_int32.classTypeInfo, clazzStringJc.classTypeInfo} );
524    clazzStringJc.addMethod("new", "new_vIICharset", 0, clazzStringJc.classTypeInfo, new FieldData[]{ clazzByteStringJc.classTypeInfo, clazz_int32.classTypeInfo, clazz_int32.classTypeInfo, clazzStringJc.classTypeInfo} );
525    clazzStringJc.addMethod("new", "new_mBYIIEncoding", 0, clazzStringJc.classTypeInfo, new FieldData[]{  field_byteM, clazz_int32.classTypeInfo, clazz_int32.classTypeInfo, clazzCharsetJc.classTypeInfo} );
526    //, java/nio/charset/Charset *.. $value
527    
528    clazzStringJc.addMethod("new", "new_CY", 0, clazzStringJc.classTypeInfo, new FieldData[]{ field_charY} );
529      clazzStringJc.addMethod("new", "new_CYI", 0, clazzStringJc.classTypeInfo, new FieldData[]{ field_charY, field_int, field_int} );
530      clazzStringJc.addMethod("charAt", "charAt", Method.modeNoThCxt, clazz_char.classTypeInfo, param_int32 );
531      clazzStringJc.addMethod("equals", "equals", Method.modeNoThCxt, clazz_int32.classTypeInfo, new ClassData[]{ clazzStringJc} );
532      clazzStringJc.addMethod("indexOf", "indexOf_C", Method.modeNoThCxt, clazz_int32.classTypeInfo, new ClassData[]{ clazz_char} );
533      clazzStringJc.addMethod("indexOf", "indexOf_CI", Method.modeNoThCxt, clazz_int32.classTypeInfo, new ClassData[]{ clazz_char, clazz_int32} );
534      clazzStringJc.addMethod("indexOf", "indexOf_s", Method.modeNoThCxt, clazz_int32.classTypeInfo, new ClassData[]{ clazzStringJc} );
535      clazzStringJc.addMethod("indexOf", "indexOf_sI", Method.modeNoThCxt, clazz_int32.classTypeInfo, new ClassData[]{ clazzStringJc, clazz_int32} );
536      clazzStringJc.addMethod("startsWith", "startsWith", Method.modeNoThCxt, clazz_bool.classTypeInfo, new ClassData[]{ clazzStringJc} );
537      clazzStringJc.addMethod("lastIndexOf", "lastIndexOf_C", Method.modeNoThCxt, clazz_int32.classTypeInfo, new ClassData[]{ clazz_char} );
538      clazzStringJc.addMethod("lastIndexOf", "lastIndexOf_CI", Method.modeNoThCxt, clazz_int32.classTypeInfo, new ClassData[]{ clazz_char, clazz_int32} );
539      clazzStringJc.addMethod("lastIndexOf", "lastIndexOf_s", Method.modeNoThCxt, clazz_int32.classTypeInfo, new ClassData[]{ clazzStringJc} );
540      clazzStringJc.addMethod("lastIndexOf", "lastIndexOf_sI", Method.modeNoThCxt, clazz_int32.classTypeInfo, new ClassData[]{ clazzStringJc, clazz_int32} );
541      clazzStringJc.addMethod("length", "length", Method.modeNoThCxt, clazz_int32.classTypeInfo);
542      clazzStringJc.addMethod("size", "size", Method.modeNoThCxt, clazz_int32.classTypeInfo);
543      clazzStringJc.addMethod("substring", "substring", clazzStringJc.classTypeInfo, new ClassData[]{ clazz_int32, clazz_int32} );
544      clazzStringJc.addMethod("substring", "substring_I", clazzStringJc.classTypeInfo, param_int32 );
545      clazzStringJc.addMethod("subSequence", "subSequence", clazzStringJc.classTypeInfo, new ClassData[]{ clazz_int32, clazz_int32} );
546      clazzStringJc.addMethod("replace", "replace", clazzStringJc.classTypeInfo, new ClassData[]{ clazz_char, clazz_char} );
547      clazzStringJc.addMethod("getChars", "getChars", 0, clazz_void.classTypeInfo, new FieldData[]{ field_int, field_int, field_charY, field_int} );
548      clazzStringJc.addMethod("getBytes", "getBytes", 0, clazzByteStringJc.classTypeInfo);
549      clazzStringJc.addMethod("getBytes", "getBytesEncoding", 0, clazzByteStringJc.classTypeInfo, paramStringJc);
550      clazzStringJc.addMethod("format", "format_a", Method.modeStatic, fieldStringJcNonPersist, new FieldData[]{ fieldStringJc} );
551      clazzStringJc.addMethod("format", "format_a", Method.modeStatic, fieldStringJcNonPersist, new FieldData[]{ fieldStringJc, field_va_argRaw} );
552      clazzStringJc.addMethod("format", "format_a", Method.modeStatic, fieldStringJcNonPersist, new FieldData[]{ fieldStringJc, field_va_argRaw, field_va_argRaw} );
553      clazzStringJc.addMethod("format", "format_a", Method.modeStatic, fieldStringJcNonPersist, new FieldData[]{ fieldStringJc, field_va_argRaw, field_va_argRaw, field_va_argRaw} );
554      clazzStringJc.addMethod("format", "format_a", Method.modeStatic, fieldStringJcNonPersist, new FieldData[]{ fieldStringJc, field_va_argRaw, field_va_argRaw, field_va_argRaw, field_va_argRaw} );
555      clazzStringJc.addMethod("format", "format_a", Method.modeStatic, fieldStringJcNonPersist, new FieldData[]{ fieldStringJc, field_va_argRaw, field_va_argRaw, field_va_argRaw, field_va_argRaw, field_va_argRaw} );
556      clazzStringJc.addMethod("format", "format_a", Method.modeStatic, fieldStringJcNonPersist, new FieldData[]{ fieldStringJc, field_va_argRaw, field_va_argRaw, field_va_argRaw, field_va_argRaw, field_va_argRaw, field_va_argRaw} );
557      clazzStringJc.addMethod("format", "format_a", Method.modeStatic, fieldStringJcNonPersist, new FieldData[]{ fieldStringJc, field_va_argRaw, field_va_argRaw, field_va_argRaw, field_va_argRaw, field_va_argRaw, field_va_argRaw, field_va_argRaw} );
558      clazzStringJc.addMethod("format", "format_a", Method.modeStatic, fieldStringJcNonPersist, new FieldData[]{ fieldStringJc, field_va_argRaw, field_va_argRaw, field_va_argRaw, field_va_argRaw, field_va_argRaw, field_va_argRaw, field_va_argRaw, field_va_argRaw} );
559      clazzStringJc.addMethod("toString", "toString", Method.modeNoThCxt, fieldStringJcNonPersist );
560      clazzStringJc.addCastFromType(clazz_s0, "s0_StringJc(?)", "t%");  //NOTE: clazz_s0 is designated as skalar, because no struct type_t should be built.
561      clazzStringJc.addCastInitializerFromType(clazz_s0, "CONST_z_StringJc(?)", "t%");
562      //done above: stdTypes.putClassType("String", clazzStringJc);
563    }
564    {
565        /*
566      clazzConcurrentLinkedQueue.addMethod("ctorO", "ctorO_Clq", Method.modeStatic, clazzConcurrentLinkedQueue.classTypeInfo, new ClassData[]{clazzConcurrentLinkedQueue});
567      clazzConcurrentLinkedQueue.addMethod("ctorO", "ctorO_MemC", Method.modeStatic, clazzConcurrentLinkedQueue.classTypeInfo, new FieldData[]{field_MemC});
568      clazzConcurrentLinkedQueue.addMethod("add", "add", clazz_bool.classTypeInfo, new ClassData[]{clazz_voidVolatile});
569      clazzConcurrentLinkedQueue.addMethod("poll", "poll", 0, clazz_voidVolatile.classTypeInfo);
570      stdTypes.putClassType("ConcurrentLinkedQueue", clazzConcurrentLinkedQueue);
571      */
572    }
573    
574    
575    {
576      clazzMemC.addMethod("alloc", "!alloc_MemC", Method.modeNoThCxt|Method.modeStatic, field_MemC, param_int);
577      javaSrcPkgVishiaBridgeC.putClassType(clazzMemC);
578      stdTypes.putClassType(clazzMemC);  //can be accessed without package.path though it is not a java.lang standard class. Used in some stc-files without package.path
579    }
580    
581    { //clazzPrintStreamJc.addMethod("println", "println_s0", clazz_void.classTypeInfo, new ClassData[]{ clazz_s0});
582      //clazzPrintStreamJc.addMethod("println", "println_s", clazz_void.classTypeInfo, new ClassData[]{ clazzStringJc});
583      //clazzPrintStreamJc.addMethod("println", "println_sb", clazz_void.classTypeInfo, new ClassData[]{ clazzStringBuilderJc});
584      //javaSrcPkgIO.putClassType(clazzPrintStreamJc);
585      //stdTypes.putClassType("PrintStream", "PrintStreamJc", clazzPrintStreamJc, "@", null);
586    }  
587    { 
588      clazzVaArgBuffer.addMethod("get_va_list", "get_va_list", 0, clazz_va_list.classTypeInfo);
589      clazzVaArgBuffer.addMethod("ctorM", "!ctorM_VaArgBuffer", Method.modeStatic, clazzVaArgBuffer.classTypeInfo, new FieldData[]{field_int});
590      clazzVaArgBuffer.addMethod("clean", "clean", 0, clazz_void.classTypeInfo);
591      clazzVaArgBuffer.addMethod("copyFrom", "copyFrom", 0, clazz_void.classTypeInfo, new FieldData[]{clazz_s0.classTypeInfo, clazz_va_list.classTypeInfo});
592      clazzVaArgBuffer.addMethod("setArg", "setArg", 0, clazz_void.classTypeInfo, new FieldData[]{clazz_int32.classTypeInfo, clazz_int32.classTypeInfo});
593      javaSrcPkgVishiaBridgeC.putClassType(clazzVaArgBuffer);
594    }
595    { //stdTypes.putClassType("Integer", "IntegerJc", clazzInteger, "S", null);
596      //clazzInteger.classLevelIdents.putClassElement("MAX_VALUE", "int32", clazz_int32, 's', '%', "%", 0, null, '.', clazzInteger);
597      //clazzInteger.classLevelIdents.putClassElement("MIN_VALUE", "int32", clazz_int32, 's', '%', "%", 0, null, '.', clazzInteger);
598      //clazzInteger.addMethod("")
599      
600    }
601    { //stdTypes.putClassType("Double", "DoubleJc", clazzDouble, "S", null);
602      //clazzDouble.addMethod("toString", "toString", Method.modeStatic, clazzStringJc.classTypeInfo, new ClassData[]{clazz_double});
603      //clazzInteger.addMethod("")
604      
605    }
606    /*
607    { stdTypes.putClassType("Math", "MathJc", clazzMath, "S", null);
608    clazzMath.addMethod("pow", "pow", Method.modeStatic, clazz_double.classTypeInfo, new ClassData[]{clazz_double, clazz_double});  
609    clazzMath.addMethod("sin", "sin", Method.modeStatic|Method.modeNoThCxt, clazz_double.classTypeInfo, new ClassData[]{clazz_double});  
610    //clazzInteger.addMethod("")
611      
612    }
613    */
614    { //clazzArrays.addMethod("binarySearch", "binarySearch_int_ii", Method.modeStatic, field_int, new FieldData[]{field_intY, field_int32, field_int32, field_int32});        
615      //clazzArrays.addMethod("binarySearch", "binarySearch_int", Method.modeStatic, field_int, new FieldData[]{field_intY, field_int32});        
616      //clazzArrays.addMethod("binarySearch", "binarySearch_int", Method.modeStatic, field_int, new FieldData[]{field_longY, field_int64});        
617      //javaSrcPkgUtil.putClassType(clazzArrays);
618      //stdTypes.putClassType("Arrays", "ArraysJc", clazzArrays, "S", null);
619    }
620    
621    //Getting the type System, the System.stc will be parsed. 
622    //In that file some other types are defined too.
623  //stdTypes.getType("Object", stdTypes);  //parse the stc-file for IntegerJc etc.
624    ////
625    //javaSrcPkgLang.putClassType(stdTypes.getType("StringBuilder", null));
626    javaSrcPkgLang.putClassType(stdTypes.getType("System", null));
627    javaSrcPkgUtil.putClassType(stdTypes.getType("java.util.Arrays", null));
628
629    
630  }
631  
632} 
633