public IEnumerator <KeyValuePair <K, V> > GetEnumerator() { java.util.Iterator it = entrySet().iterator(); while (it.hasNext()) { java.util.Map.Entry entry = (java.util.Map.Entry)it.next(); yield return(new KeyValuePair <K, V>((K)entry.getKey(), (V)entry.getValue())); } }
public override void addRenderingHints(java.util.Map hints) { Iterator iterator = hints.entrySet().iterator(); while (iterator.hasNext()) { java.util.Map.Entry entry = (java.util.Map.Entry)iterator.next(); setRenderingHint((java.awt.RenderingHints.Key)entry.getKey(), entry.getValue()); } }
private static void DumpAllJavaThreads() { Console.WriteLine(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); java.util.Map traces = java.lang.Thread.getAllStackTraces(); Console.WriteLine("Full thread dump IKVM.NET {0} ({1} bit):", JVM.SafeGetAssemblyVersion(Assembly.GetExecutingAssembly()), IntPtr.Size * 8); java.util.Iterator entries = traces.entrySet().iterator(); while (entries.hasNext()) { java.util.Map.Entry entry = (java.util.Map.Entry)entries.next(); java.lang.Thread thread = (java.lang.Thread)entry.getKey(); Console.WriteLine("\n\"{0}\"{1} prio={2} tid=0x{3:X8}", thread.getName(), thread.isDaemon() ? " daemon" : "", thread.getPriority(), thread.getId()); Console.WriteLine(" java.lang.Thread.State: " + thread.getState()); java.lang.StackTraceElement[] trace = (java.lang.StackTraceElement[])entry.getValue(); for (int i = 0; i < trace.Length; i++) { Console.WriteLine("\tat {0}", trace[i]); } } Console.WriteLine(); }
internal JReceiver GetReceiver(Serializer serializer) { net.sf.saxon.expr.instruct.Executable executable = exp.getExecutable(); JConfiguration config = executable.getConfiguration(); JPipelineConfiguration pipe = config.makePipelineConfiguration(); pipe.setHostLanguage(executable.getHostLanguage()); JProperties baseProps = new JProperties(executable.getDefaultOutputProperties()); JCharacterMapIndex charMapIndex = executable.getCharacterMapIndex(); JCharacterMapIndex characterMap = serializer.GetCharacterMap(); if (charMapIndex.isEmpty()) { charMapIndex = characterMap; } else if (characterMap != null && !characterMap.isEmpty() && charMapIndex != characterMap) { // Merge the character maps java.util.Iterator mapIter = characterMap.iterator(); while (mapIter.hasNext()) { net.sf.saxon.serialize.CharacterMap map = (net.sf.saxon.serialize.CharacterMap)mapIter.next(); charMapIndex.putCharacterMap(map.getName(), map); } } JProperties properties = serializer.GetOutputProperties(); object [] propSet = properties.entrySet().toArray(); for (int i = 0; i < properties.size(); i++) { java.util.Map.Entry entry = (java.util.Map.Entry)propSet[i]; net.sf.saxon.om.StructuredQName name = net.sf.saxon.om.StructuredQName.fromClarkName((String)entry.getKey()); net.sf.saxon.expr.instruct.ResultDocument.setSerializationProperty( baseProps, name.getURI(), name.getLocalPart(), (String)entry.getValue(), null, true, config); } serializer.SetDefaultOutputProperties(baseProps); serializer.SetCharacterMap(charMapIndex); JReceiver target = serializer.GetReceiver(pipe); return(target); }