rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
|
---|---|---|
static private Settings urlSettings(URL u, ClassLoader cl) throws InitException | static private Settings urlSettings(URL u) throws InitException | static private Settings urlSettings(URL u, ClassLoader cl) throws InitException { try { Settings s = initSettings(cl); s.load(u); return s; } catch (IOException e) { throw new InitException("Error reading from " + u.toString(), e); } } |
Settings s = initSettings(cl); | Settings s = initSettings(); | static private Settings urlSettings(URL u, ClassLoader cl) throws InitException { try { Settings s = initSettings(cl); s.load(u); return s; } catch (IOException e) { throw new InitException("Error reading from " + u.toString(), e); } } |
Class cl = Class.forName("org.springframework.beans.factory.xml.BeanDefinitionParserDelegate"); | private static String getVersion() { if (version == null) { try { Class cl = Class.forName("org.springframework.beans.factory.xml.BeanDefinitionParserDelegate"); try { cl.getMethod("parsePropertyElements", new Class[] { Element.class, BeanDefinition.class }); version = "v2b"; } catch (NoSuchMethodException e) { version = "v2a"; } } catch (Throwable e) { throw (IllegalStateException) new IllegalStateException("Could not create namespace handler for: " + version).initCause(e); } } return version; } |
|
cl.getMethod("parsePropertyElements", new Class[] { Element.class, BeanDefinition.class }); version = "v2b"; } catch (NoSuchMethodException e) { version = "v2a"; | Class.forName("org.springframework.beans.factory.parsing.BeanComponentDefinition"); version = "v2c"; } catch (ClassNotFoundException e) { Class cl = Class.forName("org.springframework.beans.factory.xml.BeanDefinitionParserDelegate"); try { cl.getMethod("parsePropertyElements", new Class[] { Element.class, BeanDefinition.class }); version = "v2b"; } catch (NoSuchMethodException e2) { version = "v2a"; } | private static String getVersion() { if (version == null) { try { Class cl = Class.forName("org.springframework.beans.factory.xml.BeanDefinitionParserDelegate"); try { cl.getMethod("parsePropertyElements", new Class[] { Element.class, BeanDefinition.class }); version = "v2b"; } catch (NoSuchMethodException e) { version = "v2a"; } } catch (Throwable e) { throw (IllegalStateException) new IllegalStateException("Could not create namespace handler for: " + version).initCause(e); } } return version; } |
} catch (Exception e) { throw new IOException("Unicode conversion error: " + e); | private void writeChars(char[] cbuf, int offset, int len) throws IOException { try { if (_asciiHack) { // cheat while (len > 0) { int max = (len < _BSIZE) ? len : _BSIZE; for (int i = 0; i < max; i++) { _bbuf[i] = (byte) cbuf[i + offset]; } _out.write(_bbuf,0,max); len -= max; offset += max; } } else { // slow, but correct int nextC = 0; while (nextC < _cpos) { nextC += _c2b.convert(cbuf,nextC,_cpos,_bbuf,0,_BSIZE); _out.write(_bbuf, 0, _c2b.nextByteIndex()); } } } catch (Exception e) { throw new IOException("Unicode conversion error: " + e); } finally { _c2b.reset(); } } |
|
File file = new File(baseDirectory.toURI().resolve(configurationFile)); | File file = new File(configurationFile); if (!file.isAbsolute()) { file = new File(baseDirectory.toURI().resolve(configurationFile)); } | public Main loadMain() { if (serverBaseDirectory == null) { throw new NullPointerException("serverBaseDirectory is null"); } File baseDirectory = new File(serverBaseDirectory); if (!baseDirectory.isDirectory()) { throw new IllegalArgumentException("serverBaseDirectory is not a directory: " + serverBaseDirectory); } if (configurationFile == null) { throw new NullPointerException("configurationFile is null"); } ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(SpringBootstrap.class.getClassLoader()); try { // add our property editors into the system if (propertyEditorPaths != null && !propertyEditorPaths.isEmpty()) { List editorSearchPath = new LinkedList(Arrays.asList(PropertyEditorManager.getEditorSearchPath())); editorSearchPath.addAll(propertyEditorPaths); PropertyEditorManager.setEditorSearchPath((String[]) editorSearchPath.toArray(new String[editorSearchPath.size()])); } // set the server base directory system property System.setProperty("xbean.base.dir", baseDirectory.getAbsolutePath()); // load the configuration file SpringApplicationContext factory; File file = new File(baseDirectory.toURI().resolve(configurationFile)); if (file.canRead()) { try { // configuration file is on the local file system factory = new FileSystemXmlApplicationContext(file.toURL().toString()); } catch (MalformedURLException e) { throw new FatalStartupError("Error creating url for bootstrap file", e); } } else { // assume it is a classpath resource factory = new ClassPathXmlApplicationContext(configurationFile); } // get the main service from the configuration file String[] names = factory.getBeanNamesForType(Main.class); Main main = null; if (names.length == 0) { throw new FatalStartupError("No bean of type: " + Main.class.getName() + " found in the bootstrap.xml", 10); } main = (Main) factory.getBean(names[0]); return main; } finally { Thread.currentThread().setContextClassLoader(oldClassLoader); } } |
case WS: case NEWLINE: | final public MapBuilder MapArgList() throws ParseException { MapBuilder map = new MapBuilder(); Object key, value; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case NEWLINE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_5: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[38] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[39] = jj_gen; break label_5; } } break; default: jj_la1[40] = jj_gen; ; } key = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_6: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[41] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[42] = jj_gen; break label_6; } } break; default: jj_la1[43] = jj_gen; ; } jj_consume_token(COLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[44] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[45] = jj_gen; break label_7; } } break; default: jj_la1[46] = jj_gen; ; } value = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_8: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[47] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[48] = jj_gen; break label_8; } } break; default: jj_la1[49] = jj_gen; ; } map.put(key, value); label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[50] = jj_gen; break label_9; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_10: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[51] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[52] = jj_gen; break label_10; } } break; default: jj_la1[53] = jj_gen; ; } key = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[54] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[55] = jj_gen; break label_11; } } break; default: jj_la1[56] = jj_gen; ; } jj_consume_token(COLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_12: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[57] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[58] = jj_gen; break label_12; } } break; default: jj_la1[59] = jj_gen; ; } value = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[60] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[61] = jj_gen; break label_13; } } break; default: jj_la1[62] = jj_gen; ; } map.put(key, value); } break; default: jj_la1[63] = jj_gen; ; } {if (true) return map;} throw new Error("Missing return statement in function"); } |
|
key = Expression(); | jj_consume_token(COLON); | final public MapBuilder MapArgList() throws ParseException { MapBuilder map = new MapBuilder(); Object key, value; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case NEWLINE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_5: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[38] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[39] = jj_gen; break label_5; } } break; default: jj_la1[40] = jj_gen; ; } key = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_6: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[41] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[42] = jj_gen; break label_6; } } break; default: jj_la1[43] = jj_gen; ; } jj_consume_token(COLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[44] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[45] = jj_gen; break label_7; } } break; default: jj_la1[46] = jj_gen; ; } value = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_8: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[47] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[48] = jj_gen; break label_8; } } break; default: jj_la1[49] = jj_gen; ; } map.put(key, value); label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[50] = jj_gen; break label_9; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_10: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[51] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[52] = jj_gen; break label_10; } } break; default: jj_la1[53] = jj_gen; ; } key = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[54] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[55] = jj_gen; break label_11; } } break; default: jj_la1[56] = jj_gen; ; } jj_consume_token(COLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_12: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[57] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[58] = jj_gen; break label_12; } } break; default: jj_la1[59] = jj_gen; ; } value = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[60] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[61] = jj_gen; break label_13; } } break; default: jj_la1[62] = jj_gen; ; } map.put(key, value); } break; default: jj_la1[63] = jj_gen; ; } {if (true) return map;} throw new Error("Missing return statement in function"); } |
jj_consume_token(COLON); | value = Expression(); | final public MapBuilder MapArgList() throws ParseException { MapBuilder map = new MapBuilder(); Object key, value; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case NEWLINE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_5: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[38] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[39] = jj_gen; break label_5; } } break; default: jj_la1[40] = jj_gen; ; } key = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_6: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[41] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[42] = jj_gen; break label_6; } } break; default: jj_la1[43] = jj_gen; ; } jj_consume_token(COLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[44] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[45] = jj_gen; break label_7; } } break; default: jj_la1[46] = jj_gen; ; } value = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_8: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[47] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[48] = jj_gen; break label_8; } } break; default: jj_la1[49] = jj_gen; ; } map.put(key, value); label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[50] = jj_gen; break label_9; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_10: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[51] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[52] = jj_gen; break label_10; } } break; default: jj_la1[53] = jj_gen; ; } key = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[54] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[55] = jj_gen; break label_11; } } break; default: jj_la1[56] = jj_gen; ; } jj_consume_token(COLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_12: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[57] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[58] = jj_gen; break label_12; } } break; default: jj_la1[59] = jj_gen; ; } value = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[60] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[61] = jj_gen; break label_13; } } break; default: jj_la1[62] = jj_gen; ; } map.put(key, value); } break; default: jj_la1[63] = jj_gen; ; } {if (true) return map;} throw new Error("Missing return statement in function"); } |
value = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_8: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[47] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[48] = jj_gen; break label_8; } } break; default: jj_la1[49] = jj_gen; ; } map.put(key, value); label_9: | map.put(key, value); label_8: | final public MapBuilder MapArgList() throws ParseException { MapBuilder map = new MapBuilder(); Object key, value; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case NEWLINE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_5: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[38] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[39] = jj_gen; break label_5; } } break; default: jj_la1[40] = jj_gen; ; } key = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_6: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[41] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[42] = jj_gen; break label_6; } } break; default: jj_la1[43] = jj_gen; ; } jj_consume_token(COLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[44] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[45] = jj_gen; break label_7; } } break; default: jj_la1[46] = jj_gen; ; } value = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_8: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[47] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[48] = jj_gen; break label_8; } } break; default: jj_la1[49] = jj_gen; ; } map.put(key, value); label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[50] = jj_gen; break label_9; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_10: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[51] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[52] = jj_gen; break label_10; } } break; default: jj_la1[53] = jj_gen; ; } key = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[54] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[55] = jj_gen; break label_11; } } break; default: jj_la1[56] = jj_gen; ; } jj_consume_token(COLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_12: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[57] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[58] = jj_gen; break label_12; } } break; default: jj_la1[59] = jj_gen; ; } value = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[60] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[61] = jj_gen; break label_13; } } break; default: jj_la1[62] = jj_gen; ; } map.put(key, value); } break; default: jj_la1[63] = jj_gen; ; } {if (true) return map;} throw new Error("Missing return statement in function"); } |
break label_9; } jj_consume_token(COMMA); | ; } key = Expression(); | final public MapBuilder MapArgList() throws ParseException { MapBuilder map = new MapBuilder(); Object key, value; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case NEWLINE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_5: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[38] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[39] = jj_gen; break label_5; } } break; default: jj_la1[40] = jj_gen; ; } key = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_6: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[41] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[42] = jj_gen; break label_6; } } break; default: jj_la1[43] = jj_gen; ; } jj_consume_token(COLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[44] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[45] = jj_gen; break label_7; } } break; default: jj_la1[46] = jj_gen; ; } value = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_8: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[47] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[48] = jj_gen; break label_8; } } break; default: jj_la1[49] = jj_gen; ; } map.put(key, value); label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[50] = jj_gen; break label_9; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_10: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[51] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[52] = jj_gen; break label_10; } } break; default: jj_la1[53] = jj_gen; ; } key = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[54] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[55] = jj_gen; break label_11; } } break; default: jj_la1[56] = jj_gen; ; } jj_consume_token(COLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_12: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[57] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[58] = jj_gen; break label_12; } } break; default: jj_la1[59] = jj_gen; ; } value = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[60] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[61] = jj_gen; break label_13; } } break; default: jj_la1[62] = jj_gen; ; } map.put(key, value); } break; default: jj_la1[63] = jj_gen; ; } {if (true) return map;} throw new Error("Missing return statement in function"); } |
value = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[60] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[61] = jj_gen; break label_13; } } break; default: jj_la1[62] = jj_gen; ; } | final public MapBuilder MapArgList() throws ParseException { MapBuilder map = new MapBuilder(); Object key, value; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case NEWLINE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_5: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[38] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[39] = jj_gen; break label_5; } } break; default: jj_la1[40] = jj_gen; ; } key = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_6: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[41] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[42] = jj_gen; break label_6; } } break; default: jj_la1[43] = jj_gen; ; } jj_consume_token(COLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[44] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[45] = jj_gen; break label_7; } } break; default: jj_la1[46] = jj_gen; ; } value = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_8: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[47] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[48] = jj_gen; break label_8; } } break; default: jj_la1[49] = jj_gen; ; } map.put(key, value); label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[50] = jj_gen; break label_9; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_10: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[51] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[52] = jj_gen; break label_10; } } break; default: jj_la1[53] = jj_gen; ; } key = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[54] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[55] = jj_gen; break label_11; } } break; default: jj_la1[56] = jj_gen; ; } jj_consume_token(COLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_12: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[57] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[58] = jj_gen; break label_12; } } break; default: jj_la1[59] = jj_gen; ; } value = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[60] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[61] = jj_gen; break label_13; } } break; default: jj_la1[62] = jj_gen; ; } map.put(key, value); } break; default: jj_la1[63] = jj_gen; ; } {if (true) return map;} throw new Error("Missing return statement in function"); } |
|
jj_la1[63] = jj_gen; | jj_la1[60] = jj_gen; | final public MapBuilder MapArgList() throws ParseException { MapBuilder map = new MapBuilder(); Object key, value; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case NEWLINE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_5: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[38] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[39] = jj_gen; break label_5; } } break; default: jj_la1[40] = jj_gen; ; } key = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_6: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[41] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[42] = jj_gen; break label_6; } } break; default: jj_la1[43] = jj_gen; ; } jj_consume_token(COLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[44] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[45] = jj_gen; break label_7; } } break; default: jj_la1[46] = jj_gen; ; } value = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_8: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[47] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[48] = jj_gen; break label_8; } } break; default: jj_la1[49] = jj_gen; ; } map.put(key, value); label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[50] = jj_gen; break label_9; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_10: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[51] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[52] = jj_gen; break label_10; } } break; default: jj_la1[53] = jj_gen; ; } key = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[54] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[55] = jj_gen; break label_11; } } break; default: jj_la1[56] = jj_gen; ; } jj_consume_token(COLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_12: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[57] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[58] = jj_gen; break label_12; } } break; default: jj_la1[59] = jj_gen; ; } value = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; case NEWLINE: jj_consume_token(NEWLINE); break; default: jj_la1[60] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: case NEWLINE: ; break; default: jj_la1[61] = jj_gen; break label_13; } } break; default: jj_la1[62] = jj_gen; ; } map.put(key, value); } break; default: jj_la1[63] = jj_gen; ; } {if (true) return map;} throw new Error("Missing return statement in function"); } |
jj_la1_0 = new int[] {0x40000000,0xc0000000,0x40000000,0x80000000,0x40000000,0x80000000,0x40000000,0xc0000000,0xc0000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x0,0x0,0x100000,0x0,0x700000,0x600000,0x700000,0x600000,0x3000000,0x3100000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0x0,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xff108000,0x40000000,0x40000000,0x0,0x40000000,0x40000000,0x7f108000,0x40000000,0x40000000,0x0,0x40000000,0x40000000,0x40100000,0x0,0x0,0x40000000,0x40000000,0x40000000,0x3f108000,0x40000000,0x0,0x40000000,0x40000000,0x0,0x40000000,0x0,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000,0x100000,0xe20800,0x620800,0xd20800,0xf20800,0xf26800,0x6000,0xf26800,0x4000,0xf29800,0x9000,0xf29800,0xf2f800,0xf26800,0x6000,0xf26800,0x4000,0x9000,0x729801,0x2000,0xf2f800,0xf000,0xf2f800,}; | jj_la1_0 = new int[] {0x40000000,0xc0000000,0x40000000,0x80000000,0x40000000,0x80000000,0x40000000,0xc0000000,0xc0000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x0,0x0,0x100000,0x0,0x700000,0x600000,0x700000,0x600000,0x3000000,0x3100000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0x0,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0x3f108000,0xc0000000,0xc0000000,0xc0000000,0x40000000,0x40000000,0x0,0x40000000,0x40000000,0x7f108000,0x40000000,0x40000000,0x0,0x40000000,0x40000000,0x40100000,0x0,0x0,0x40000000,0x40000000,0x40000000,0x3f108000,0x40000000,0x0,0x40000000,0x40000000,0x0,0x40000000,0x0,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000,0x100000,0xe20800,0x620800,0xd20800,0xf20800,0xf26800,0x6000,0xf26800,0x4000,0xf29800,0x9000,0xf29800,0xf2f800,0xf26800,0x6000,0xf26800,0x4000,0x9000,0x729801,0x2000,0xf2f800,0xf000,0xf2f800,}; | private static void jj_la1_0() { jj_la1_0 = new int[] {0x40000000,0xc0000000,0x40000000,0x80000000,0x40000000,0x80000000,0x40000000,0xc0000000,0xc0000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x0,0x0,0x100000,0x0,0x700000,0x600000,0x700000,0x600000,0x3000000,0x3100000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0x0,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xc0000000,0xff108000,0x40000000,0x40000000,0x0,0x40000000,0x40000000,0x7f108000,0x40000000,0x40000000,0x0,0x40000000,0x40000000,0x40100000,0x0,0x0,0x40000000,0x40000000,0x40000000,0x3f108000,0x40000000,0x0,0x40000000,0x40000000,0x0,0x40000000,0x0,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000,0x100000,0xe20800,0x620800,0xd20800,0xf20800,0xf26800,0x6000,0xf26800,0x4000,0xf29800,0x9000,0xf29800,0xf2f800,0xf26800,0x6000,0xf26800,0x4000,0x9000,0x729801,0x2000,0xf2f800,0xf000,0xf2f800,}; } |
jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400000,0x1,0x0,0x400001,0x2000000,0x2000000,0x4000000,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x884005,0x0,0x0,0x100000,0x0,0x0,0x884005,0x0,0x0,0x100000,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x0,0x884005,0x0,0x18000,0x0,0x0,0x6000,0x0,0x1fc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; | jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400000,0x1,0x0,0x400001,0x2000000,0x2000000,0x4000000,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x884005,0x0,0x0,0x0,0x0,0x0,0x100000,0x0,0x0,0x884005,0x0,0x0,0x100000,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x0,0x884005,0x0,0x18000,0x0,0x0,0x6000,0x0,0x1fc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; | private static void jj_la1_1() { jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400000,0x1,0x0,0x400001,0x2000000,0x2000000,0x4000000,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x884005,0x0,0x0,0x100000,0x0,0x0,0x884005,0x0,0x0,0x100000,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x0,0x884005,0x0,0x18000,0x0,0x0,0x6000,0x0,0x1fc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; } |
_log = _broker.getLog("directive"); | public Object build(DirectiveBuilder builder, BuildContext bc) throws BuildException { _broker = bc.getBroker(); // BeanConf object is created by the init method when this directive // is registered by the DirectiveProvider beanConf = (BeanConf)_broker.getBrokerLocal("BeanDirective.Conf"); if (beanConf == null){ throw new BuildException( "Error building the #bean directive. The directive has not been properly initialized!"); } try { target = (Variable) builder.getArg(BEAN_TARGET, bc); } catch (ClassCastException e) { throw new NotVariableBuildException(myDescr.name, e); } targetName = target.getName(); _className = (String)builder.getArg(BEAN_CLASS_NAME, bc); _class = classForName(_className); // check if bean is declared as static // this implies global scope and no constructor invocation isStaticClass = (builder.getArg(BEAN_TYPE_STATIC) != null); if (isStaticClass) scope = BEAN_SCOPE_GLOBAL; else { scope = getScope(builder, bc); // initArgs is only valid for non-static beans initArgObj = builder.getArg(BEAN_INITARGS_VAL); if (initArgObj instanceof Builder) initArgObj = ((Builder)initArgObj).build(bc); } onNewBlock = (Block)builder.getArg(BEAN_ON_NEW_BLOCK, bc); if (DEBUG) System.err.println("DBG: #bean, target="+target +", className="+_className+", scope="+scope +", isStaticClass="+isStaticClass+", initArgs="+initArgObj); return this; } |
|
if (DEBUG) System.err.println("DBG: #bean, target="+target +", className="+_className+", scope="+scope +", isStaticClass="+isStaticClass+", initArgs="+initArgObj); | _log.debug("BeanDirective, target="+target +", className="+_className+", scope="+scope +", isStaticClass="+isStaticClass+", initArgs="+initArgObj); | public Object build(DirectiveBuilder builder, BuildContext bc) throws BuildException { _broker = bc.getBroker(); // BeanConf object is created by the init method when this directive // is registered by the DirectiveProvider beanConf = (BeanConf)_broker.getBrokerLocal("BeanDirective.Conf"); if (beanConf == null){ throw new BuildException( "Error building the #bean directive. The directive has not been properly initialized!"); } try { target = (Variable) builder.getArg(BEAN_TARGET, bc); } catch (ClassCastException e) { throw new NotVariableBuildException(myDescr.name, e); } targetName = target.getName(); _className = (String)builder.getArg(BEAN_CLASS_NAME, bc); _class = classForName(_className); // check if bean is declared as static // this implies global scope and no constructor invocation isStaticClass = (builder.getArg(BEAN_TYPE_STATIC) != null); if (isStaticClass) scope = BEAN_SCOPE_GLOBAL; else { scope = getScope(builder, bc); // initArgs is only valid for non-static beans initArgObj = builder.getArg(BEAN_INITARGS_VAL); if (initArgObj instanceof Builder) initArgObj = ((Builder)initArgObj).build(bc); } onNewBlock = (Block)builder.getArg(BEAN_ON_NEW_BLOCK, bc); if (DEBUG) System.err.println("DBG: #bean, target="+target +", className="+_className+", scope="+scope +", isStaticClass="+isStaticClass+", initArgs="+initArgObj); return this; } |
if (DEBUG){ System.err.println("DBG: #bean - impliedPackages: " + bCfg.impliedPackages); System.err.println("DBG: #bean - allowedPackages: " + bCfg.allowedPackages); } | Log log = b.getLog("directive"); log.debug("BeanDirective initialization - impliedPackages: " + bCfg.impliedPackages); log.debug("BeanDirective initialization - allowedPackages: " + bCfg.allowedPackages); | public static void init(Broker b){ // get configuration parameters synchronized (b){ BeanConf bCfg = new BeanConf(b); b.setBrokerLocal("BeanDirective.Conf", bCfg); if (DEBUG){ System.err.println("DBG: #bean - impliedPackages: " + bCfg.impliedPackages); System.err.println("DBG: #bean - allowedPackages: " + bCfg.allowedPackages); } } } |
throw new PropertyException("#bean usage error: session scope is only valid with servlets!"); | PropertyException e = new PropertyException( "#bean usage error: session scope is only valid with servlets!"); _broker.getEvaluationExceptionHandler().evaluate( target, context, e); | public void write(FastWriter out, Context context) throws PropertyException, IOException { Map globalBeans = BeanConf.globalBeans; Map appBeans = beanConf.appBeans; boolean isNew = false; try { while (initArgObj instanceof Macro) initArgObj = ((Macro) initArgObj).evaluate(context); // store init args in array if (initArgObj == null || initArgObj.getClass().isArray()){ initArgs = (Object[])initArgObj; } else { initArgs = new Object[1]; initArgs[0] = initArgObj; } Object o = null; Class c = null; switch (scope){ case BEAN_SCOPE_GLOBAL: synchronized (globalBeans){ o = globalBeans.get(targetName); if (o == null){ if (isStaticClass){ c = context.getBroker().classForName(_className); o = new org.webmacro.engine.StaticClassWrapper(c); } else { //c = Class.forName(_className); //o = c.newInstance(); o = instantiate(_className, initArgs); } isNew = true; globalBeans.put(targetName,o); } } break; case BEAN_SCOPE_APPLICATION: synchronized (appBeans){ o = appBeans.get(targetName); if (o == null){ o = instantiate(_className, initArgs); isNew = true; appBeans.put(targetName, o); } } break; case BEAN_SCOPE_SESSION: javax.servlet.http.HttpSession session = (javax.servlet.http.HttpSession)context.getProperty("Session"); //if (context instanceof WebContext){ if (session != null){ synchronized(session){ o = session.getAttribute(targetName); if (o == null){ o = instantiate(_className, initArgs); isNew = true; session.setAttribute(targetName, o); } } } else { throw new PropertyException("#bean usage error: session scope is only valid with servlets!"); } break; default: // make "page" the default scope //case BEAN_SCOPE_PAGE: // NOTE: page beans always overwrite anything in the context // with the same name o = instantiate(_className, initArgs); isNew = true; if (o != null){ Class[] paramTypes = { Context.class }; try { java.lang.reflect.Method m = o.getClass().getMethod("init", paramTypes); if (m != null){ Object[] args = { context }; m.invoke(o, args); } } catch (Exception e){ // ignore } } break; } if (DEBUG) System.err.println("#bean: Class " + _className + " loaded."); target.setValue(context, o); } catch (PropertyException e) { if (DEBUG) System.err.println("#bean: Class " + _className + " failed: " + e); this._log.error("#bean: Class " + _className + " failed.", e); throw e; } catch (Exception e) { String errorText = "#bean: Unable to load bean " + target + " of type " + _className; context.getBroker().getLog("engine").error(errorText, e); writeWarning(errorText, context, out); } if (isNew && onNewBlock != null) onNewBlock.write(out, context); } |
if (DEBUG) System.err.println("#bean: Class " + _className + " loaded."); | _log.debug("BeanDirective: Class " + _className + " loaded."); | public void write(FastWriter out, Context context) throws PropertyException, IOException { Map globalBeans = BeanConf.globalBeans; Map appBeans = beanConf.appBeans; boolean isNew = false; try { while (initArgObj instanceof Macro) initArgObj = ((Macro) initArgObj).evaluate(context); // store init args in array if (initArgObj == null || initArgObj.getClass().isArray()){ initArgs = (Object[])initArgObj; } else { initArgs = new Object[1]; initArgs[0] = initArgObj; } Object o = null; Class c = null; switch (scope){ case BEAN_SCOPE_GLOBAL: synchronized (globalBeans){ o = globalBeans.get(targetName); if (o == null){ if (isStaticClass){ c = context.getBroker().classForName(_className); o = new org.webmacro.engine.StaticClassWrapper(c); } else { //c = Class.forName(_className); //o = c.newInstance(); o = instantiate(_className, initArgs); } isNew = true; globalBeans.put(targetName,o); } } break; case BEAN_SCOPE_APPLICATION: synchronized (appBeans){ o = appBeans.get(targetName); if (o == null){ o = instantiate(_className, initArgs); isNew = true; appBeans.put(targetName, o); } } break; case BEAN_SCOPE_SESSION: javax.servlet.http.HttpSession session = (javax.servlet.http.HttpSession)context.getProperty("Session"); //if (context instanceof WebContext){ if (session != null){ synchronized(session){ o = session.getAttribute(targetName); if (o == null){ o = instantiate(_className, initArgs); isNew = true; session.setAttribute(targetName, o); } } } else { throw new PropertyException("#bean usage error: session scope is only valid with servlets!"); } break; default: // make "page" the default scope //case BEAN_SCOPE_PAGE: // NOTE: page beans always overwrite anything in the context // with the same name o = instantiate(_className, initArgs); isNew = true; if (o != null){ Class[] paramTypes = { Context.class }; try { java.lang.reflect.Method m = o.getClass().getMethod("init", paramTypes); if (m != null){ Object[] args = { context }; m.invoke(o, args); } } catch (Exception e){ // ignore } } break; } if (DEBUG) System.err.println("#bean: Class " + _className + " loaded."); target.setValue(context, o); } catch (PropertyException e) { if (DEBUG) System.err.println("#bean: Class " + _className + " failed: " + e); this._log.error("#bean: Class " + _className + " failed.", e); throw e; } catch (Exception e) { String errorText = "#bean: Unable to load bean " + target + " of type " + _className; context.getBroker().getLog("engine").error(errorText, e); writeWarning(errorText, context, out); } if (isNew && onNewBlock != null) onNewBlock.write(out, context); } |
if (DEBUG) System.err.println("#bean: Class " + _className + " failed: " + e); this._log.error("#bean: Class " + _className + " failed.", e); throw e; | this._broker.getEvaluationExceptionHandler().evaluate(target, context, e); | public void write(FastWriter out, Context context) throws PropertyException, IOException { Map globalBeans = BeanConf.globalBeans; Map appBeans = beanConf.appBeans; boolean isNew = false; try { while (initArgObj instanceof Macro) initArgObj = ((Macro) initArgObj).evaluate(context); // store init args in array if (initArgObj == null || initArgObj.getClass().isArray()){ initArgs = (Object[])initArgObj; } else { initArgs = new Object[1]; initArgs[0] = initArgObj; } Object o = null; Class c = null; switch (scope){ case BEAN_SCOPE_GLOBAL: synchronized (globalBeans){ o = globalBeans.get(targetName); if (o == null){ if (isStaticClass){ c = context.getBroker().classForName(_className); o = new org.webmacro.engine.StaticClassWrapper(c); } else { //c = Class.forName(_className); //o = c.newInstance(); o = instantiate(_className, initArgs); } isNew = true; globalBeans.put(targetName,o); } } break; case BEAN_SCOPE_APPLICATION: synchronized (appBeans){ o = appBeans.get(targetName); if (o == null){ o = instantiate(_className, initArgs); isNew = true; appBeans.put(targetName, o); } } break; case BEAN_SCOPE_SESSION: javax.servlet.http.HttpSession session = (javax.servlet.http.HttpSession)context.getProperty("Session"); //if (context instanceof WebContext){ if (session != null){ synchronized(session){ o = session.getAttribute(targetName); if (o == null){ o = instantiate(_className, initArgs); isNew = true; session.setAttribute(targetName, o); } } } else { throw new PropertyException("#bean usage error: session scope is only valid with servlets!"); } break; default: // make "page" the default scope //case BEAN_SCOPE_PAGE: // NOTE: page beans always overwrite anything in the context // with the same name o = instantiate(_className, initArgs); isNew = true; if (o != null){ Class[] paramTypes = { Context.class }; try { java.lang.reflect.Method m = o.getClass().getMethod("init", paramTypes); if (m != null){ Object[] args = { context }; m.invoke(o, args); } } catch (Exception e){ // ignore } } break; } if (DEBUG) System.err.println("#bean: Class " + _className + " loaded."); target.setValue(context, o); } catch (PropertyException e) { if (DEBUG) System.err.println("#bean: Class " + _className + " failed: " + e); this._log.error("#bean: Class " + _className + " failed.", e); throw e; } catch (Exception e) { String errorText = "#bean: Unable to load bean " + target + " of type " + _className; context.getBroker().getLog("engine").error(errorText, e); writeWarning(errorText, context, out); } if (isNew && onNewBlock != null) onNewBlock.write(out, context); } |
String errorText = "#bean: Unable to load bean " + target + " of type " + _className; context.getBroker().getLog("engine").error(errorText, e); | String errorText = "BeanDirective: Unable to load bean " + target + " of type " + _className; _log.error(errorText, e); | public void write(FastWriter out, Context context) throws PropertyException, IOException { Map globalBeans = BeanConf.globalBeans; Map appBeans = beanConf.appBeans; boolean isNew = false; try { while (initArgObj instanceof Macro) initArgObj = ((Macro) initArgObj).evaluate(context); // store init args in array if (initArgObj == null || initArgObj.getClass().isArray()){ initArgs = (Object[])initArgObj; } else { initArgs = new Object[1]; initArgs[0] = initArgObj; } Object o = null; Class c = null; switch (scope){ case BEAN_SCOPE_GLOBAL: synchronized (globalBeans){ o = globalBeans.get(targetName); if (o == null){ if (isStaticClass){ c = context.getBroker().classForName(_className); o = new org.webmacro.engine.StaticClassWrapper(c); } else { //c = Class.forName(_className); //o = c.newInstance(); o = instantiate(_className, initArgs); } isNew = true; globalBeans.put(targetName,o); } } break; case BEAN_SCOPE_APPLICATION: synchronized (appBeans){ o = appBeans.get(targetName); if (o == null){ o = instantiate(_className, initArgs); isNew = true; appBeans.put(targetName, o); } } break; case BEAN_SCOPE_SESSION: javax.servlet.http.HttpSession session = (javax.servlet.http.HttpSession)context.getProperty("Session"); //if (context instanceof WebContext){ if (session != null){ synchronized(session){ o = session.getAttribute(targetName); if (o == null){ o = instantiate(_className, initArgs); isNew = true; session.setAttribute(targetName, o); } } } else { throw new PropertyException("#bean usage error: session scope is only valid with servlets!"); } break; default: // make "page" the default scope //case BEAN_SCOPE_PAGE: // NOTE: page beans always overwrite anything in the context // with the same name o = instantiate(_className, initArgs); isNew = true; if (o != null){ Class[] paramTypes = { Context.class }; try { java.lang.reflect.Method m = o.getClass().getMethod("init", paramTypes); if (m != null){ Object[] args = { context }; m.invoke(o, args); } } catch (Exception e){ // ignore } } break; } if (DEBUG) System.err.println("#bean: Class " + _className + " loaded."); target.setValue(context, o); } catch (PropertyException e) { if (DEBUG) System.err.println("#bean: Class " + _className + " failed: " + e); this._log.error("#bean: Class " + _className + " failed.", e); throw e; } catch (Exception e) { String errorText = "#bean: Unable to load bean " + target + " of type " + _className; context.getBroker().getLog("engine").error(errorText, e); writeWarning(errorText, context, out); } if (isNew && onNewBlock != null) onNewBlock.write(out, context); } |
SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(final Packet packet) { try { if (customList.contains(StringUtils.parseBareAddress(packet.getFrom()))) { cancelledNotification(packet.getFrom(), ""); } } catch (Exception e) { Log.error(e); } } }, new PacketTypeFilter(Message.class)); | MessageEventRequestListener messageEventRequestListener = new ChatMessageEventRequestListener(); SparkManager.getMessageEventManager(). addMessageEventRequestListener(messageEventRequestListener); | private ChatManager() { chatContainer = new ChatContainer(); // Add a Message Handler SparkManager.getMessageEventManager().addMessageEventNotificationListener(this); SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(final Packet packet) { try { if (customList.contains(StringUtils.parseBareAddress(packet.getFrom()))) { cancelledNotification(packet.getFrom(), ""); } } catch (Exception e) { Log.error(e); } } }, new PacketTypeFilter(Message.class)); } |
final ContactList contactList = SparkManager.getWorkspace().getContactList(); | ContactList contactList = SparkManager.getWorkspace().getContactList(); | public void run() { final ContactList contactList = SparkManager.getWorkspace().getContactList(); ChatRoom chatRoom = null; try { chatRoom = getChatContainer().getChatRoom(StringUtils.parseBareAddress(from)); if (chatRoom != null && chatRoom instanceof ChatRoomImpl) { ((ChatRoomImpl)chatRoom).showTyping(true); } } catch (ChatRoomNotFoundException e) { } contactList.setIconFor(from, SparkRes.getImageIcon(SparkRes.SMALL_MESSAGE_EDIT_IMAGE)); customList.add(StringUtils.parseBareAddress(from)); } |
((ChatRoomImpl)chatRoom).showTyping(true); | ((ChatRoomImpl)chatRoom).showTyping(false); | public void run() { final ContactList contactList = SparkManager.getWorkspace().getContactList(); ChatRoom chatRoom = null; try { chatRoom = getChatContainer().getChatRoom(StringUtils.parseBareAddress(from)); if (chatRoom != null && chatRoom instanceof ChatRoomImpl) { ((ChatRoomImpl)chatRoom).showTyping(true); } } catch (ChatRoomNotFoundException e) { } contactList.setIconFor(from, SparkRes.getImageIcon(SparkRes.SMALL_MESSAGE_EDIT_IMAGE)); customList.add(StringUtils.parseBareAddress(from)); } |
contactList.setIconFor(from, SparkRes.getImageIcon(SparkRes.SMALL_MESSAGE_EDIT_IMAGE)); customList.add(StringUtils.parseBareAddress(from)); | contactList.useDefaults(from); customList.remove(StringUtils.parseBareAddress(from)); | public void run() { final ContactList contactList = SparkManager.getWorkspace().getContactList(); ChatRoom chatRoom = null; try { chatRoom = getChatContainer().getChatRoom(StringUtils.parseBareAddress(from)); if (chatRoom != null && chatRoom instanceof ChatRoomImpl) { ((ChatRoomImpl)chatRoom).showTyping(true); } } catch (ChatRoomNotFoundException e) { } contactList.setIconFor(from, SparkRes.getImageIcon(SparkRes.SMALL_MESSAGE_EDIT_IMAGE)); customList.add(StringUtils.parseBareAddress(from)); } |
c._locale = _locale; | protected Object clone() { Context c = null; try { c = (Context) super.clone(); } catch (CloneNotSupportedException e) { // Object supports clone } c._localState = null; c._beanState = null; c._state = 0; c._locals = null; c._bean = null; return c; } |
|
Thread.currentThread().setContextClassLoader(classLoader); | public void preprocess(SpringApplicationContext applicationContext, XmlBeanDefinitionReader reader, Document document) { // determine the classLoader ClassLoader classLoader; NodeList classpathElements = document.getDocumentElement().getElementsByTagName("classpath"); if (classpathElements.getLength() < 1) { classLoader = getClass().getClassLoader(); } else if (classpathElements.getLength() > 1) { throw new FatalBeanException("Expected only classpath element but found " + classpathElements.getLength()); } else { Element classpathElement = (Element) classpathElements.item(0); // build the classpath List classpath = new ArrayList(); NodeList locations = classpathElement.getElementsByTagName("location"); for (int i = 0; i < locations.getLength(); i++) { Element locationElement = (Element) locations.item(i); String location = ((Text) locationElement.getFirstChild()).getData().trim(); classpath.add(location); } // convert the paths to URLS URL[] urls = new URL[classpath.size()]; for (ListIterator iterator = classpath.listIterator(); iterator.hasNext();) { String location = (String) iterator.next(); urls[iterator.previousIndex()] = repository.getResource(location); } // create the classloader classLoader = new MultiParentClassLoader(applicationContext.getDisplayName(), urls, getClass().getClassLoader()); // remove the classpath element so Spring doesn't get confused document.getDocumentElement().removeChild(classpathElement); } // assign the class loader to the xml reader and the application context reader.setBeanClassLoader(classLoader); applicationContext.setClassLoader(classLoader); } |
|
out.println(namespace.replace(":", "\\:") + "=" + NAMESPACE_HANDLER); | out.println(namespace.replaceAll(":", "\\\\:") + "=" + NAMESPACE_HANDLER); | public void generate(NamespaceMapping namespaceMapping) throws IOException { String namespace = namespaceMapping.getNamespace(); if (namespace == null) { return; } File file = new File(metaInfDir, NamespaceHelper.createDiscoveryPathName(namespace)); file.getParentFile().mkdirs(); log.log("Generating META-INF properties file: " + file + " for namespace: " + namespace); PrintWriter out = new PrintWriter(new FileWriter(file)); try { generatePropertiesFile(out, namespaceMapping.getElements()); } finally { out.close(); } // Generate spring 2.0 mapping file = new File(metaInfDir, "META-INF/spring.handlers"); log.log("Generating Spring 2.0 handler mapping: " + file + " for namespace: " + namespace); out = new PrintWriter(new FileWriter(file)); try { out.println(namespace.replace(":", "\\:") + "=" + NAMESPACE_HANDLER); } finally { out.close(); } } |
if(con != null){ con.connect(); } | private XMPPConnection getConnection() throws XMPPException { LocalPreferences localPref = SettingsManager.getLocalPreferences(); XMPPConnection con; // Get connection int port = localPref.getXmppPort(); String serverName = getServer(); int checkForPort = serverName.indexOf(":"); if (checkForPort != -1) { String portString = serverName.substring(checkForPort + 1); if (ModelUtil.hasLength(portString)) { // Set new port. port = Integer.valueOf(portString); } } boolean useSSL = localPref.isSSL(); boolean hostPortConfigured = localPref.isHostAndPortConfigured(); if (useSSL) { if (!hostPortConfigured) { con = new XMPPConnection(serverName); } else { con = new XMPPConnection(localPref.getXmppHost(), port, serverName); } } else { if (!hostPortConfigured) { con = new XMPPConnection(serverName); } else { con = new XMPPConnection(localPref.getXmppHost(), port, serverName); } } return con; } |
|
cancelButton.setFont(new Font("Dialog", Font.BOLD, 10)); | cancelButton.setFont(new Font("Dialog", Font.BOLD, 11)); | private void decorateCancelButton() { cancelButton.setVisible(false); ResourceUtils.resButton(cancelButton, Res.getString("cancel")); cancelButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); cancelButton.setForeground(new Color(73, 113, 196)); cancelButton.setFont(new Font("Dialog", Font.BOLD, 10)); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { cancelTransfer(); } }); cancelButton.addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent e) { cancelButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); } public void mouseExited(MouseEvent e) { cancelButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } }); } |
openFileButton.setFont(new Font("Dialog", Font.BOLD, 10)); | openFileButton.setFont(new Font("Dialog", Font.BOLD, 11)); | private void transferDone(final FileTransferRequest request, FileTransfer transfer) { cancelButton.setVisible(false); showAlert(true); String bareJID = StringUtils.parseBareAddress(request.getRequestor()); ContactList contactList = SparkManager.getWorkspace().getContactList(); ContactItem contactItem = contactList.getContactItemByJID(bareJID); titleLabel.setText(Res.getString("message.received.file", contactItem.getNickname())); fileLabel.setText(request.getFileName()); remove(acceptLabel); remove(declineLabel); remove(progressBar); final TransferButton openFileButton = new TransferButton(); final TransferButton openFolderButton = new TransferButton(); add(openFileButton, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); add(openFolderButton, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); Downloads downloads = Downloads.getInstance(); final File downloadedFile = new File(downloads.getDownloadDirectory(), request.getFileName()); openFileButton.addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent e) { openFileButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); } public void mouseExited(MouseEvent e) { openFileButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } }); openFolderButton.addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent e) { openFolderButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); } public void mouseExited(MouseEvent e) { openFolderButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } }); add(fileLabel, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0)); ResourceUtils.resButton(openFileButton, Res.getString("open")); ResourceUtils.resButton(openFolderButton, Res.getString("open.folder")); openFileButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); openFileButton.setForeground(new Color(73, 113, 196)); openFileButton.setFont(new Font("Dialog", Font.BOLD, 10)); openFolderButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); openFolderButton.setForeground(new Color(73, 113, 196)); openFolderButton.setFont(new Font("Dialog", Font.BOLD, 10)); imageLabel.setIcon(GraphicUtils.getIcon(downloadedFile)); imageLabel.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { showPopup(e, downloadedFile); } public void mouseReleased(MouseEvent e) { showPopup(e, downloadedFile); } }); openFileButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { openFile(downloadedFile); } }); openFolderButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { try { Downloads downloads = Downloads.getInstance(); if (!Spark.isMac()) { try { Desktop.open(downloads.getDownloadDirectory()); } catch (DesktopException e) { Log.error(e); } } else if (Spark.isMac()) { Runtime.getRuntime().exec("open " + downloads.getDownloadDirectory().getCanonicalPath()); } } catch (IOException e1) { Log.error(e1); } } }); if (isImage(downloadedFile.getName())) { try { URL imageURL = downloadedFile.toURL(); ImageIcon image = new ImageIcon(imageURL); image = GraphicUtils.scaleImageIcon(image, 64, 64); imageLabel.setIcon(image); } catch (MalformedURLException e) { Log.error("Could not locate image.", e); imageLabel.setIcon(SparkRes.getImageIcon(SparkRes.DOCUMENT_INFO_32x32)); } } invalidate(); validate(); repaint(); } |
openFolderButton.setFont(new Font("Dialog", Font.BOLD, 10)); | openFolderButton.setFont(new Font("Dialog", Font.BOLD, 11)); | private void transferDone(final FileTransferRequest request, FileTransfer transfer) { cancelButton.setVisible(false); showAlert(true); String bareJID = StringUtils.parseBareAddress(request.getRequestor()); ContactList contactList = SparkManager.getWorkspace().getContactList(); ContactItem contactItem = contactList.getContactItemByJID(bareJID); titleLabel.setText(Res.getString("message.received.file", contactItem.getNickname())); fileLabel.setText(request.getFileName()); remove(acceptLabel); remove(declineLabel); remove(progressBar); final TransferButton openFileButton = new TransferButton(); final TransferButton openFolderButton = new TransferButton(); add(openFileButton, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); add(openFolderButton, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); Downloads downloads = Downloads.getInstance(); final File downloadedFile = new File(downloads.getDownloadDirectory(), request.getFileName()); openFileButton.addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent e) { openFileButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); } public void mouseExited(MouseEvent e) { openFileButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } }); openFolderButton.addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent e) { openFolderButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); } public void mouseExited(MouseEvent e) { openFolderButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } }); add(fileLabel, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0)); ResourceUtils.resButton(openFileButton, Res.getString("open")); ResourceUtils.resButton(openFolderButton, Res.getString("open.folder")); openFileButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); openFileButton.setForeground(new Color(73, 113, 196)); openFileButton.setFont(new Font("Dialog", Font.BOLD, 10)); openFolderButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); openFolderButton.setForeground(new Color(73, 113, 196)); openFolderButton.setFont(new Font("Dialog", Font.BOLD, 10)); imageLabel.setIcon(GraphicUtils.getIcon(downloadedFile)); imageLabel.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { showPopup(e, downloadedFile); } public void mouseReleased(MouseEvent e) { showPopup(e, downloadedFile); } }); openFileButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { openFile(downloadedFile); } }); openFolderButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { try { Downloads downloads = Downloads.getInstance(); if (!Spark.isMac()) { try { Desktop.open(downloads.getDownloadDirectory()); } catch (DesktopException e) { Log.error(e); } } else if (Spark.isMac()) { Runtime.getRuntime().exec("open " + downloads.getDownloadDirectory().getCanonicalPath()); } } catch (IOException e1) { Log.error(e1); } } }); if (isImage(downloadedFile.getName())) { try { URL imageURL = downloadedFile.toURL(); ImageIcon image = new ImageIcon(imageURL); image = GraphicUtils.scaleImageIcon(image, 64, 64); imageLabel.setIcon(image); } catch (MalformedURLException e) { Log.error("Could not locate image.", e); imageLabel.setIcon(SparkRes.getImageIcon(SparkRes.DOCUMENT_INFO_32x32)); } } invalidate(); validate(); repaint(); } |
ChatPreferences chatPref = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE); final String nickname = chatPref.getNickname().trim(); | LocalPreferences pref = SettingsManager.getLocalPreferences(); final String nickname = pref.getNickname().trim(); | public static void autoJoinConferenceRoom(final String roomName, String roomJID, String password) { ChatManager chatManager = SparkManager.getChatManager(); final MultiUserChat groupChat = new MultiUserChat(SparkManager.getConnection(), roomJID); ChatPreferences chatPref = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE); final String nickname = chatPref.getNickname().trim(); try { GroupChatRoom chatRoom = (GroupChatRoom)chatManager.getChatContainer().getChatRoom(roomJID); MultiUserChat muc = chatRoom.getMultiUserChat(); if (!muc.isJoined()) { joinRoom(muc, nickname, password); } chatManager.getChatContainer().activateChatRoom(chatRoom); return; } catch (ChatRoomNotFoundException e) { } final GroupChatRoom room = new GroupChatRoom(groupChat); room.setTabTitle(roomName); if (requiresPassword(roomJID) && password == null) { password = JOptionPane.showInputDialog(null, "Enter Room Password", "Need Password", JOptionPane.QUESTION_MESSAGE); if (!ModelUtil.hasLength(password)) { return; } } final List errors = new ArrayList(); final String userPassword = password; final SwingWorker startChat = new SwingWorker() { public Object construct() { if (!groupChat.isJoined()) { int groupChatCounter = 0; while (true) { groupChatCounter++; String joinName = nickname; if (groupChatCounter > 1) { joinName = joinName + groupChatCounter; } if (groupChatCounter < 10) { try { if (ModelUtil.hasLength(userPassword)) { groupChat.join(joinName, userPassword); } else { groupChat.join(joinName); } break; } catch (XMPPException ex) { int code = 0; if (ex.getXMPPError() != null) { code = ex.getXMPPError().getCode(); } if (code == 0) { errors.add("No response from server."); } else if (code == 401) { errors.add("The password did not match the room's password."); } else if (code == 403) { errors.add("You have been banned from this room."); } else if (code == 404) { errors.add("The room you are trying to enter does not exist."); } else if (code == 407) { errors.add("You are not a member of this room.\nThis room requires you to be a member to join."); } else if (code != 409) { break; } } } else { break; } } } return "ok"; } public void finished() { if (errors.size() > 0) { String error = (String)errors.get(0); JOptionPane.showMessageDialog(SparkManager.getMainWindow(), error, "Unable to join the room at this time.", JOptionPane.ERROR_MESSAGE); return; } else if (groupChat.isJoined()) { ChatManager chatManager = SparkManager.getChatManager(); chatManager.getChatContainer().addChatRoom(room); chatManager.getChatContainer().activateChatRoom(room); } else { JOptionPane.showMessageDialog(SparkManager.getMainWindow(), "Unable to join the room.", "Error", JOptionPane.ERROR_MESSAGE); return; } } }; startChat.start(); } |
ChatPreferences chatPref = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE); chatRoom.create(chatPref.getNickname()); | LocalPreferences pref = SettingsManager.getLocalPreferences(); chatRoom.create(pref.getNickname()); | public static void createPrivateConference(String serviceName, String message, String roomName, Collection jids) { final MultiUserChat chatRoom = new MultiUserChat(SparkManager.getConnection(), roomName + "@" + serviceName); final GroupChatRoom room = new GroupChatRoom(chatRoom); try { ChatPreferences chatPref = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE); chatRoom.create(chatPref.getNickname()); // Since this is a private room, make the room not public and set user as owner of the room. Form submitForm = chatRoom.getConfigurationForm().createAnswerForm(); submitForm.setAnswer("muc#roomconfig_publicroom", false); submitForm.setAnswer("muc#roomconfig_roomname", roomName); List owners = new ArrayList(); owners.add(SparkManager.getSessionManager().getBareAddress()); submitForm.setAnswer("muc#roomconfig_roomowners", owners); chatRoom.sendConfigurationForm(submitForm); } catch (XMPPException e1) { Log.error("Unable to send conference room chat configuration form.", e1); } ChatManager chatManager = SparkManager.getChatManager(); // Check if room already is open try { chatManager.getChatContainer().getChatRoom(room.getRoomname()); } catch (ChatRoomNotFoundException e) { chatManager.getChatContainer().addChatRoom(room); chatManager.getChatContainer().activateChatRoom(room); } final Iterator jidsToInvite = jids.iterator(); while (jidsToInvite.hasNext()) { String jid = (String)jidsToInvite.next(); chatRoom.invite(jid, message); room.getTranscriptWindow().insertNotificationMessage("Waiting for " + jid + " to join."); } } |
ChatPreferences chatPref = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE); final String nickname = chatPref.getNickname().trim(); | final LocalPreferences pref = SettingsManager.getLocalPreferences(); final String nickname = pref.getNickname().trim(); | public static GroupChatRoom enterRoomOnSameThread(final String roomName, String roomJID, String password) { ChatManager chatManager = SparkManager.getChatManager(); final MultiUserChat groupChat = new MultiUserChat(SparkManager.getConnection(), roomJID); ChatPreferences chatPref = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE); final String nickname = chatPref.getNickname().trim(); try { GroupChatRoom chatRoom = (GroupChatRoom)chatManager.getChatContainer().getChatRoom(roomJID); MultiUserChat muc = chatRoom.getMultiUserChat(); if (!muc.isJoined()) { joinRoom(muc, nickname, password); } chatManager.getChatContainer().activateChatRoom(chatRoom); return chatRoom; } catch (ChatRoomNotFoundException e) { } final GroupChatRoom room = new GroupChatRoom(groupChat); room.setTabTitle(roomName); if (requiresPassword(roomJID) && password == null) { password = JOptionPane.showInputDialog(null, "Enter Room Password", "Need Password", JOptionPane.QUESTION_MESSAGE); if (!ModelUtil.hasLength(password)) { return null; } } final List errors = new ArrayList(); final String userPassword = password; if (!groupChat.isJoined()) { int groupChatCounter = 0; while (true) { groupChatCounter++; String joinName = nickname; if (groupChatCounter > 1) { joinName = joinName + groupChatCounter; } if (groupChatCounter < 10) { try { if (ModelUtil.hasLength(userPassword)) { groupChat.join(joinName, userPassword); } else { groupChat.join(joinName); } break; } catch (XMPPException ex) { int code = 0; if (ex.getXMPPError() != null) { code = ex.getXMPPError().getCode(); } if (code == 0) { errors.add("No response from server."); } else if (code == 401) { errors.add("The password did not match the room's password."); } else if (code == 403) { errors.add("You have been banned from this room."); } else if (code == 404) { errors.add("The room you are trying to enter does not exist."); } else if (code == 407) { errors.add("You are not a member of this room.\nThis room requires you to be a member to join."); } else if (code != 409) { break; } } } else { break; } } } if (errors.size() > 0) { String error = (String)errors.get(0); JOptionPane.showMessageDialog(SparkManager.getMainWindow(), error, "Unable to join the room at this time.", JOptionPane.ERROR_MESSAGE); return null; } else if (groupChat.isJoined()) { chatManager.getChatContainer().addChatRoom(room); chatManager.getChatContainer().activateChatRoom(room); } else { JOptionPane.showMessageDialog(SparkManager.getMainWindow(), "Unable to join the room.", "Error", JOptionPane.ERROR_MESSAGE); return null; } return room; } |
final ChatPreferences pref = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE); | final LocalPreferences pref = SettingsManager.getLocalPreferences(); | public void joinRoom(final String roomJID, final String roomName) { final ChatPreferences pref = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE); // Set default nickname nicknameField.setText(pref.getNickname()); // Enable password field if a password is required passwordField.setVisible(false); passwordLabel.setVisible(false); roomNameDescription.setText(roomName); final JOptionPane pane; TitlePanel titlePanel; // Create the title panel for this dialog titlePanel = new TitlePanel("Join Conference Room", "Specify information for conference room.", SparkRes.getImageIcon(SparkRes.BLANK_IMAGE), true); // Construct main panel w/ layout. final JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); mainPanel.add(titlePanel, BorderLayout.NORTH); // The user should only be able to close this dialog. Object[] options = {"Join", "Cancel"}; pane = new JOptionPane(this, JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, options, options[0]); mainPanel.add(pane, BorderLayout.CENTER); final JOptionPane p = new JOptionPane(); final JDialog dlg = p.createDialog(SparkManager.getMainWindow(), "Conference Rooms"); dlg.setModal(false); dlg.pack(); dlg.setSize(350, 250); dlg.setResizable(true); dlg.setContentPane(mainPanel); dlg.setLocationRelativeTo(SparkManager.getMainWindow()); PropertyChangeListener changeListener = new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { String value = (String)pane.getValue(); if ("Cancel".equals(value)) { pane.setValue(JOptionPane.UNINITIALIZED_VALUE); dlg.dispose(); } else if ("Join".equals(value)) { pane.setValue(JOptionPane.UNINITIALIZED_VALUE); dlg.dispose(); ConferenceUtils.autoJoinConferenceRoom(roomName, roomJID, null); } } }; pane.addPropertyChangeListener(changeListener); dlg.setVisible(true); dlg.toFront(); dlg.requestFocus(); SwingWorker worker = new SwingWorker() { boolean requiresPassword; public Object construct() { requiresPassword = ConferenceUtils.requiresPassword(roomJID); return new Boolean(requiresPassword); } public void finished() { passwordField.setVisible(requiresPassword); passwordLabel.setVisible(requiresPassword); } }; worker.start(); } |
String prop; Object nextProp = null; | String propName; Object nextPropValue = null; | public Object getProperty (final Context context, final Object instance, final Object[] names, int start, int end) throws PropertyException { String prop; Object nextProp = null; Accessor acc = null; if (names[start] instanceof String) { prop = (String) names[start]; } else if (names[start] instanceof PropertyMethod) { PropertyMethod pm = (PropertyMethod) names[start]; prop = pm.getName(); acc = (Accessor) _directAccessors.get(prop); Object[] args = pm.getArguments(context); if (acc == null) { if (isMethodRestricted(instance.getClass(), prop)) throw new PropertyException.RestrictedMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } try { nextProp = acc.get(instance, args); start++; } catch (NoSuchMethodException e) { throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } } else { prop = names[start].toString(); } // unary? if (acc == null) { acc = (Accessor) _unaryAccessors.get(prop); if (acc != null) { try { nextProp = acc.get(instance); start++; } catch (NoSuchMethodException e) { acc = null; } } } // binary? if (acc == null) { acc = (Accessor) _binaryAccessors.get(prop); if ((acc != null) && ((start + 1) <= end)) { try { nextProp = acc.get(instance, (String) names[start + 1]); start += 2; } catch (NoSuchMethodException e) { acc = null; } catch (ClassCastException e) { // names[start + 1] was not a String, just move on // this catch is more efficient than using instanceof // since 90% of the time it really will be a string acc = null; } } else { acc = null; } } // hash? if (acc == null) { acc = _hashAccessor; try { if (acc != null) { nextProp = acc.get(instance, prop); start++; } } catch (NoSuchMethodException e) { acc = null; } } if (acc == null) { // user tried to access a property of a property that doesn't exist // ex: $TestObject.FirstName.NotThere // check if object is restricted if (isMethodRestricted(instance.getClass(), "get" + prop) || isMethodRestricted(instance.getClass(), "set" + prop)) throw new PropertyException.RestrictedPropertyException( prop, fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchPropertyException( prop, fillInName(names, start), instance.getClass().getName()); } if (start <= end) { try { return _cache.getOperator(nextProp) .getProperty(context, nextProp, names, start, end); } catch (NullPointerException e) { // $Foo.getNull().SomeProperty is what makes this happen throw new PropertyException("$" + fillInName(names, start) + " is null. Cannot access ." + names[end]); } } else { return nextProp; } } |
prop = (String) names[start]; | propName = (String) names[start]; | public Object getProperty (final Context context, final Object instance, final Object[] names, int start, int end) throws PropertyException { String prop; Object nextProp = null; Accessor acc = null; if (names[start] instanceof String) { prop = (String) names[start]; } else if (names[start] instanceof PropertyMethod) { PropertyMethod pm = (PropertyMethod) names[start]; prop = pm.getName(); acc = (Accessor) _directAccessors.get(prop); Object[] args = pm.getArguments(context); if (acc == null) { if (isMethodRestricted(instance.getClass(), prop)) throw new PropertyException.RestrictedMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } try { nextProp = acc.get(instance, args); start++; } catch (NoSuchMethodException e) { throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } } else { prop = names[start].toString(); } // unary? if (acc == null) { acc = (Accessor) _unaryAccessors.get(prop); if (acc != null) { try { nextProp = acc.get(instance); start++; } catch (NoSuchMethodException e) { acc = null; } } } // binary? if (acc == null) { acc = (Accessor) _binaryAccessors.get(prop); if ((acc != null) && ((start + 1) <= end)) { try { nextProp = acc.get(instance, (String) names[start + 1]); start += 2; } catch (NoSuchMethodException e) { acc = null; } catch (ClassCastException e) { // names[start + 1] was not a String, just move on // this catch is more efficient than using instanceof // since 90% of the time it really will be a string acc = null; } } else { acc = null; } } // hash? if (acc == null) { acc = _hashAccessor; try { if (acc != null) { nextProp = acc.get(instance, prop); start++; } } catch (NoSuchMethodException e) { acc = null; } } if (acc == null) { // user tried to access a property of a property that doesn't exist // ex: $TestObject.FirstName.NotThere // check if object is restricted if (isMethodRestricted(instance.getClass(), "get" + prop) || isMethodRestricted(instance.getClass(), "set" + prop)) throw new PropertyException.RestrictedPropertyException( prop, fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchPropertyException( prop, fillInName(names, start), instance.getClass().getName()); } if (start <= end) { try { return _cache.getOperator(nextProp) .getProperty(context, nextProp, names, start, end); } catch (NullPointerException e) { // $Foo.getNull().SomeProperty is what makes this happen throw new PropertyException("$" + fillInName(names, start) + " is null. Cannot access ." + names[end]); } } else { return nextProp; } } |
prop = pm.getName(); acc = (Accessor) _directAccessors.get(prop); | propName = pm.getName(); acc = (Accessor) _directAccessors.get(propName); | public Object getProperty (final Context context, final Object instance, final Object[] names, int start, int end) throws PropertyException { String prop; Object nextProp = null; Accessor acc = null; if (names[start] instanceof String) { prop = (String) names[start]; } else if (names[start] instanceof PropertyMethod) { PropertyMethod pm = (PropertyMethod) names[start]; prop = pm.getName(); acc = (Accessor) _directAccessors.get(prop); Object[] args = pm.getArguments(context); if (acc == null) { if (isMethodRestricted(instance.getClass(), prop)) throw new PropertyException.RestrictedMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } try { nextProp = acc.get(instance, args); start++; } catch (NoSuchMethodException e) { throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } } else { prop = names[start].toString(); } // unary? if (acc == null) { acc = (Accessor) _unaryAccessors.get(prop); if (acc != null) { try { nextProp = acc.get(instance); start++; } catch (NoSuchMethodException e) { acc = null; } } } // binary? if (acc == null) { acc = (Accessor) _binaryAccessors.get(prop); if ((acc != null) && ((start + 1) <= end)) { try { nextProp = acc.get(instance, (String) names[start + 1]); start += 2; } catch (NoSuchMethodException e) { acc = null; } catch (ClassCastException e) { // names[start + 1] was not a String, just move on // this catch is more efficient than using instanceof // since 90% of the time it really will be a string acc = null; } } else { acc = null; } } // hash? if (acc == null) { acc = _hashAccessor; try { if (acc != null) { nextProp = acc.get(instance, prop); start++; } } catch (NoSuchMethodException e) { acc = null; } } if (acc == null) { // user tried to access a property of a property that doesn't exist // ex: $TestObject.FirstName.NotThere // check if object is restricted if (isMethodRestricted(instance.getClass(), "get" + prop) || isMethodRestricted(instance.getClass(), "set" + prop)) throw new PropertyException.RestrictedPropertyException( prop, fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchPropertyException( prop, fillInName(names, start), instance.getClass().getName()); } if (start <= end) { try { return _cache.getOperator(nextProp) .getProperty(context, nextProp, names, start, end); } catch (NullPointerException e) { // $Foo.getNull().SomeProperty is what makes this happen throw new PropertyException("$" + fillInName(names, start) + " is null. Cannot access ." + names[end]); } } else { return nextProp; } } |
if (isMethodRestricted(instance.getClass(), prop)) | if (isMethodRestricted(instance.getClass(), propName)) | public Object getProperty (final Context context, final Object instance, final Object[] names, int start, int end) throws PropertyException { String prop; Object nextProp = null; Accessor acc = null; if (names[start] instanceof String) { prop = (String) names[start]; } else if (names[start] instanceof PropertyMethod) { PropertyMethod pm = (PropertyMethod) names[start]; prop = pm.getName(); acc = (Accessor) _directAccessors.get(prop); Object[] args = pm.getArguments(context); if (acc == null) { if (isMethodRestricted(instance.getClass(), prop)) throw new PropertyException.RestrictedMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } try { nextProp = acc.get(instance, args); start++; } catch (NoSuchMethodException e) { throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } } else { prop = names[start].toString(); } // unary? if (acc == null) { acc = (Accessor) _unaryAccessors.get(prop); if (acc != null) { try { nextProp = acc.get(instance); start++; } catch (NoSuchMethodException e) { acc = null; } } } // binary? if (acc == null) { acc = (Accessor) _binaryAccessors.get(prop); if ((acc != null) && ((start + 1) <= end)) { try { nextProp = acc.get(instance, (String) names[start + 1]); start += 2; } catch (NoSuchMethodException e) { acc = null; } catch (ClassCastException e) { // names[start + 1] was not a String, just move on // this catch is more efficient than using instanceof // since 90% of the time it really will be a string acc = null; } } else { acc = null; } } // hash? if (acc == null) { acc = _hashAccessor; try { if (acc != null) { nextProp = acc.get(instance, prop); start++; } } catch (NoSuchMethodException e) { acc = null; } } if (acc == null) { // user tried to access a property of a property that doesn't exist // ex: $TestObject.FirstName.NotThere // check if object is restricted if (isMethodRestricted(instance.getClass(), "get" + prop) || isMethodRestricted(instance.getClass(), "set" + prop)) throw new PropertyException.RestrictedPropertyException( prop, fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchPropertyException( prop, fillInName(names, start), instance.getClass().getName()); } if (start <= end) { try { return _cache.getOperator(nextProp) .getProperty(context, nextProp, names, start, end); } catch (NullPointerException e) { // $Foo.getNull().SomeProperty is what makes this happen throw new PropertyException("$" + fillInName(names, start) + " is null. Cannot access ." + names[end]); } } else { return nextProp; } } |
nextProp = acc.get(instance, args); | nextPropValue = acc.get(instance, args); | public Object getProperty (final Context context, final Object instance, final Object[] names, int start, int end) throws PropertyException { String prop; Object nextProp = null; Accessor acc = null; if (names[start] instanceof String) { prop = (String) names[start]; } else if (names[start] instanceof PropertyMethod) { PropertyMethod pm = (PropertyMethod) names[start]; prop = pm.getName(); acc = (Accessor) _directAccessors.get(prop); Object[] args = pm.getArguments(context); if (acc == null) { if (isMethodRestricted(instance.getClass(), prop)) throw new PropertyException.RestrictedMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } try { nextProp = acc.get(instance, args); start++; } catch (NoSuchMethodException e) { throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } } else { prop = names[start].toString(); } // unary? if (acc == null) { acc = (Accessor) _unaryAccessors.get(prop); if (acc != null) { try { nextProp = acc.get(instance); start++; } catch (NoSuchMethodException e) { acc = null; } } } // binary? if (acc == null) { acc = (Accessor) _binaryAccessors.get(prop); if ((acc != null) && ((start + 1) <= end)) { try { nextProp = acc.get(instance, (String) names[start + 1]); start += 2; } catch (NoSuchMethodException e) { acc = null; } catch (ClassCastException e) { // names[start + 1] was not a String, just move on // this catch is more efficient than using instanceof // since 90% of the time it really will be a string acc = null; } } else { acc = null; } } // hash? if (acc == null) { acc = _hashAccessor; try { if (acc != null) { nextProp = acc.get(instance, prop); start++; } } catch (NoSuchMethodException e) { acc = null; } } if (acc == null) { // user tried to access a property of a property that doesn't exist // ex: $TestObject.FirstName.NotThere // check if object is restricted if (isMethodRestricted(instance.getClass(), "get" + prop) || isMethodRestricted(instance.getClass(), "set" + prop)) throw new PropertyException.RestrictedPropertyException( prop, fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchPropertyException( prop, fillInName(names, start), instance.getClass().getName()); } if (start <= end) { try { return _cache.getOperator(nextProp) .getProperty(context, nextProp, names, start, end); } catch (NullPointerException e) { // $Foo.getNull().SomeProperty is what makes this happen throw new PropertyException("$" + fillInName(names, start) + " is null. Cannot access ." + names[end]); } } else { return nextProp; } } |
prop = names[start].toString(); | propName = names[start].toString(); | public Object getProperty (final Context context, final Object instance, final Object[] names, int start, int end) throws PropertyException { String prop; Object nextProp = null; Accessor acc = null; if (names[start] instanceof String) { prop = (String) names[start]; } else if (names[start] instanceof PropertyMethod) { PropertyMethod pm = (PropertyMethod) names[start]; prop = pm.getName(); acc = (Accessor) _directAccessors.get(prop); Object[] args = pm.getArguments(context); if (acc == null) { if (isMethodRestricted(instance.getClass(), prop)) throw new PropertyException.RestrictedMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } try { nextProp = acc.get(instance, args); start++; } catch (NoSuchMethodException e) { throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } } else { prop = names[start].toString(); } // unary? if (acc == null) { acc = (Accessor) _unaryAccessors.get(prop); if (acc != null) { try { nextProp = acc.get(instance); start++; } catch (NoSuchMethodException e) { acc = null; } } } // binary? if (acc == null) { acc = (Accessor) _binaryAccessors.get(prop); if ((acc != null) && ((start + 1) <= end)) { try { nextProp = acc.get(instance, (String) names[start + 1]); start += 2; } catch (NoSuchMethodException e) { acc = null; } catch (ClassCastException e) { // names[start + 1] was not a String, just move on // this catch is more efficient than using instanceof // since 90% of the time it really will be a string acc = null; } } else { acc = null; } } // hash? if (acc == null) { acc = _hashAccessor; try { if (acc != null) { nextProp = acc.get(instance, prop); start++; } } catch (NoSuchMethodException e) { acc = null; } } if (acc == null) { // user tried to access a property of a property that doesn't exist // ex: $TestObject.FirstName.NotThere // check if object is restricted if (isMethodRestricted(instance.getClass(), "get" + prop) || isMethodRestricted(instance.getClass(), "set" + prop)) throw new PropertyException.RestrictedPropertyException( prop, fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchPropertyException( prop, fillInName(names, start), instance.getClass().getName()); } if (start <= end) { try { return _cache.getOperator(nextProp) .getProperty(context, nextProp, names, start, end); } catch (NullPointerException e) { // $Foo.getNull().SomeProperty is what makes this happen throw new PropertyException("$" + fillInName(names, start) + " is null. Cannot access ." + names[end]); } } else { return nextProp; } } |
acc = (Accessor) _unaryAccessors.get(prop); | acc = (Accessor) _unaryAccessors.get(propName); | public Object getProperty (final Context context, final Object instance, final Object[] names, int start, int end) throws PropertyException { String prop; Object nextProp = null; Accessor acc = null; if (names[start] instanceof String) { prop = (String) names[start]; } else if (names[start] instanceof PropertyMethod) { PropertyMethod pm = (PropertyMethod) names[start]; prop = pm.getName(); acc = (Accessor) _directAccessors.get(prop); Object[] args = pm.getArguments(context); if (acc == null) { if (isMethodRestricted(instance.getClass(), prop)) throw new PropertyException.RestrictedMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } try { nextProp = acc.get(instance, args); start++; } catch (NoSuchMethodException e) { throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } } else { prop = names[start].toString(); } // unary? if (acc == null) { acc = (Accessor) _unaryAccessors.get(prop); if (acc != null) { try { nextProp = acc.get(instance); start++; } catch (NoSuchMethodException e) { acc = null; } } } // binary? if (acc == null) { acc = (Accessor) _binaryAccessors.get(prop); if ((acc != null) && ((start + 1) <= end)) { try { nextProp = acc.get(instance, (String) names[start + 1]); start += 2; } catch (NoSuchMethodException e) { acc = null; } catch (ClassCastException e) { // names[start + 1] was not a String, just move on // this catch is more efficient than using instanceof // since 90% of the time it really will be a string acc = null; } } else { acc = null; } } // hash? if (acc == null) { acc = _hashAccessor; try { if (acc != null) { nextProp = acc.get(instance, prop); start++; } } catch (NoSuchMethodException e) { acc = null; } } if (acc == null) { // user tried to access a property of a property that doesn't exist // ex: $TestObject.FirstName.NotThere // check if object is restricted if (isMethodRestricted(instance.getClass(), "get" + prop) || isMethodRestricted(instance.getClass(), "set" + prop)) throw new PropertyException.RestrictedPropertyException( prop, fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchPropertyException( prop, fillInName(names, start), instance.getClass().getName()); } if (start <= end) { try { return _cache.getOperator(nextProp) .getProperty(context, nextProp, names, start, end); } catch (NullPointerException e) { // $Foo.getNull().SomeProperty is what makes this happen throw new PropertyException("$" + fillInName(names, start) + " is null. Cannot access ." + names[end]); } } else { return nextProp; } } |
nextProp = acc.get(instance); | nextPropValue = acc.get(instance); | public Object getProperty (final Context context, final Object instance, final Object[] names, int start, int end) throws PropertyException { String prop; Object nextProp = null; Accessor acc = null; if (names[start] instanceof String) { prop = (String) names[start]; } else if (names[start] instanceof PropertyMethod) { PropertyMethod pm = (PropertyMethod) names[start]; prop = pm.getName(); acc = (Accessor) _directAccessors.get(prop); Object[] args = pm.getArguments(context); if (acc == null) { if (isMethodRestricted(instance.getClass(), prop)) throw new PropertyException.RestrictedMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } try { nextProp = acc.get(instance, args); start++; } catch (NoSuchMethodException e) { throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } } else { prop = names[start].toString(); } // unary? if (acc == null) { acc = (Accessor) _unaryAccessors.get(prop); if (acc != null) { try { nextProp = acc.get(instance); start++; } catch (NoSuchMethodException e) { acc = null; } } } // binary? if (acc == null) { acc = (Accessor) _binaryAccessors.get(prop); if ((acc != null) && ((start + 1) <= end)) { try { nextProp = acc.get(instance, (String) names[start + 1]); start += 2; } catch (NoSuchMethodException e) { acc = null; } catch (ClassCastException e) { // names[start + 1] was not a String, just move on // this catch is more efficient than using instanceof // since 90% of the time it really will be a string acc = null; } } else { acc = null; } } // hash? if (acc == null) { acc = _hashAccessor; try { if (acc != null) { nextProp = acc.get(instance, prop); start++; } } catch (NoSuchMethodException e) { acc = null; } } if (acc == null) { // user tried to access a property of a property that doesn't exist // ex: $TestObject.FirstName.NotThere // check if object is restricted if (isMethodRestricted(instance.getClass(), "get" + prop) || isMethodRestricted(instance.getClass(), "set" + prop)) throw new PropertyException.RestrictedPropertyException( prop, fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchPropertyException( prop, fillInName(names, start), instance.getClass().getName()); } if (start <= end) { try { return _cache.getOperator(nextProp) .getProperty(context, nextProp, names, start, end); } catch (NullPointerException e) { // $Foo.getNull().SomeProperty is what makes this happen throw new PropertyException("$" + fillInName(names, start) + " is null. Cannot access ." + names[end]); } } else { return nextProp; } } |
acc = (Accessor) _binaryAccessors.get(prop); if ((acc != null) && ((start + 1) <= end)) | acc = (Accessor) _binaryAccessors.get(propName); if ((acc != null) && ((start + 1) <= names.length)) | public Object getProperty (final Context context, final Object instance, final Object[] names, int start, int end) throws PropertyException { String prop; Object nextProp = null; Accessor acc = null; if (names[start] instanceof String) { prop = (String) names[start]; } else if (names[start] instanceof PropertyMethod) { PropertyMethod pm = (PropertyMethod) names[start]; prop = pm.getName(); acc = (Accessor) _directAccessors.get(prop); Object[] args = pm.getArguments(context); if (acc == null) { if (isMethodRestricted(instance.getClass(), prop)) throw new PropertyException.RestrictedMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } try { nextProp = acc.get(instance, args); start++; } catch (NoSuchMethodException e) { throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } } else { prop = names[start].toString(); } // unary? if (acc == null) { acc = (Accessor) _unaryAccessors.get(prop); if (acc != null) { try { nextProp = acc.get(instance); start++; } catch (NoSuchMethodException e) { acc = null; } } } // binary? if (acc == null) { acc = (Accessor) _binaryAccessors.get(prop); if ((acc != null) && ((start + 1) <= end)) { try { nextProp = acc.get(instance, (String) names[start + 1]); start += 2; } catch (NoSuchMethodException e) { acc = null; } catch (ClassCastException e) { // names[start + 1] was not a String, just move on // this catch is more efficient than using instanceof // since 90% of the time it really will be a string acc = null; } } else { acc = null; } } // hash? if (acc == null) { acc = _hashAccessor; try { if (acc != null) { nextProp = acc.get(instance, prop); start++; } } catch (NoSuchMethodException e) { acc = null; } } if (acc == null) { // user tried to access a property of a property that doesn't exist // ex: $TestObject.FirstName.NotThere // check if object is restricted if (isMethodRestricted(instance.getClass(), "get" + prop) || isMethodRestricted(instance.getClass(), "set" + prop)) throw new PropertyException.RestrictedPropertyException( prop, fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchPropertyException( prop, fillInName(names, start), instance.getClass().getName()); } if (start <= end) { try { return _cache.getOperator(nextProp) .getProperty(context, nextProp, names, start, end); } catch (NullPointerException e) { // $Foo.getNull().SomeProperty is what makes this happen throw new PropertyException("$" + fillInName(names, start) + " is null. Cannot access ." + names[end]); } } else { return nextProp; } } |
nextProp = acc.get(instance, (String) names[start + 1]); | nextPropValue = acc.get(instance, (String) names[start + 1]); | public Object getProperty (final Context context, final Object instance, final Object[] names, int start, int end) throws PropertyException { String prop; Object nextProp = null; Accessor acc = null; if (names[start] instanceof String) { prop = (String) names[start]; } else if (names[start] instanceof PropertyMethod) { PropertyMethod pm = (PropertyMethod) names[start]; prop = pm.getName(); acc = (Accessor) _directAccessors.get(prop); Object[] args = pm.getArguments(context); if (acc == null) { if (isMethodRestricted(instance.getClass(), prop)) throw new PropertyException.RestrictedMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } try { nextProp = acc.get(instance, args); start++; } catch (NoSuchMethodException e) { throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } } else { prop = names[start].toString(); } // unary? if (acc == null) { acc = (Accessor) _unaryAccessors.get(prop); if (acc != null) { try { nextProp = acc.get(instance); start++; } catch (NoSuchMethodException e) { acc = null; } } } // binary? if (acc == null) { acc = (Accessor) _binaryAccessors.get(prop); if ((acc != null) && ((start + 1) <= end)) { try { nextProp = acc.get(instance, (String) names[start + 1]); start += 2; } catch (NoSuchMethodException e) { acc = null; } catch (ClassCastException e) { // names[start + 1] was not a String, just move on // this catch is more efficient than using instanceof // since 90% of the time it really will be a string acc = null; } } else { acc = null; } } // hash? if (acc == null) { acc = _hashAccessor; try { if (acc != null) { nextProp = acc.get(instance, prop); start++; } } catch (NoSuchMethodException e) { acc = null; } } if (acc == null) { // user tried to access a property of a property that doesn't exist // ex: $TestObject.FirstName.NotThere // check if object is restricted if (isMethodRestricted(instance.getClass(), "get" + prop) || isMethodRestricted(instance.getClass(), "set" + prop)) throw new PropertyException.RestrictedPropertyException( prop, fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchPropertyException( prop, fillInName(names, start), instance.getClass().getName()); } if (start <= end) { try { return _cache.getOperator(nextProp) .getProperty(context, nextProp, names, start, end); } catch (NullPointerException e) { // $Foo.getNull().SomeProperty is what makes this happen throw new PropertyException("$" + fillInName(names, start) + " is null. Cannot access ." + names[end]); } } else { return nextProp; } } |
nextProp = acc.get(instance, prop); | nextPropValue = acc.get(instance, propName); | public Object getProperty (final Context context, final Object instance, final Object[] names, int start, int end) throws PropertyException { String prop; Object nextProp = null; Accessor acc = null; if (names[start] instanceof String) { prop = (String) names[start]; } else if (names[start] instanceof PropertyMethod) { PropertyMethod pm = (PropertyMethod) names[start]; prop = pm.getName(); acc = (Accessor) _directAccessors.get(prop); Object[] args = pm.getArguments(context); if (acc == null) { if (isMethodRestricted(instance.getClass(), prop)) throw new PropertyException.RestrictedMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } try { nextProp = acc.get(instance, args); start++; } catch (NoSuchMethodException e) { throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } } else { prop = names[start].toString(); } // unary? if (acc == null) { acc = (Accessor) _unaryAccessors.get(prop); if (acc != null) { try { nextProp = acc.get(instance); start++; } catch (NoSuchMethodException e) { acc = null; } } } // binary? if (acc == null) { acc = (Accessor) _binaryAccessors.get(prop); if ((acc != null) && ((start + 1) <= end)) { try { nextProp = acc.get(instance, (String) names[start + 1]); start += 2; } catch (NoSuchMethodException e) { acc = null; } catch (ClassCastException e) { // names[start + 1] was not a String, just move on // this catch is more efficient than using instanceof // since 90% of the time it really will be a string acc = null; } } else { acc = null; } } // hash? if (acc == null) { acc = _hashAccessor; try { if (acc != null) { nextProp = acc.get(instance, prop); start++; } } catch (NoSuchMethodException e) { acc = null; } } if (acc == null) { // user tried to access a property of a property that doesn't exist // ex: $TestObject.FirstName.NotThere // check if object is restricted if (isMethodRestricted(instance.getClass(), "get" + prop) || isMethodRestricted(instance.getClass(), "set" + prop)) throw new PropertyException.RestrictedPropertyException( prop, fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchPropertyException( prop, fillInName(names, start), instance.getClass().getName()); } if (start <= end) { try { return _cache.getOperator(nextProp) .getProperty(context, nextProp, names, start, end); } catch (NullPointerException e) { // $Foo.getNull().SomeProperty is what makes this happen throw new PropertyException("$" + fillInName(names, start) + " is null. Cannot access ." + names[end]); } } else { return nextProp; } } |
if (isMethodRestricted(instance.getClass(), "get" + prop) || isMethodRestricted(instance.getClass(), "set" + prop)) | if (isMethodRestricted(instance.getClass(), "get" + propName) || isMethodRestricted(instance.getClass(), "set" + propName)) | public Object getProperty (final Context context, final Object instance, final Object[] names, int start, int end) throws PropertyException { String prop; Object nextProp = null; Accessor acc = null; if (names[start] instanceof String) { prop = (String) names[start]; } else if (names[start] instanceof PropertyMethod) { PropertyMethod pm = (PropertyMethod) names[start]; prop = pm.getName(); acc = (Accessor) _directAccessors.get(prop); Object[] args = pm.getArguments(context); if (acc == null) { if (isMethodRestricted(instance.getClass(), prop)) throw new PropertyException.RestrictedMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } try { nextProp = acc.get(instance, args); start++; } catch (NoSuchMethodException e) { throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } } else { prop = names[start].toString(); } // unary? if (acc == null) { acc = (Accessor) _unaryAccessors.get(prop); if (acc != null) { try { nextProp = acc.get(instance); start++; } catch (NoSuchMethodException e) { acc = null; } } } // binary? if (acc == null) { acc = (Accessor) _binaryAccessors.get(prop); if ((acc != null) && ((start + 1) <= end)) { try { nextProp = acc.get(instance, (String) names[start + 1]); start += 2; } catch (NoSuchMethodException e) { acc = null; } catch (ClassCastException e) { // names[start + 1] was not a String, just move on // this catch is more efficient than using instanceof // since 90% of the time it really will be a string acc = null; } } else { acc = null; } } // hash? if (acc == null) { acc = _hashAccessor; try { if (acc != null) { nextProp = acc.get(instance, prop); start++; } } catch (NoSuchMethodException e) { acc = null; } } if (acc == null) { // user tried to access a property of a property that doesn't exist // ex: $TestObject.FirstName.NotThere // check if object is restricted if (isMethodRestricted(instance.getClass(), "get" + prop) || isMethodRestricted(instance.getClass(), "set" + prop)) throw new PropertyException.RestrictedPropertyException( prop, fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchPropertyException( prop, fillInName(names, start), instance.getClass().getName()); } if (start <= end) { try { return _cache.getOperator(nextProp) .getProperty(context, nextProp, names, start, end); } catch (NullPointerException e) { // $Foo.getNull().SomeProperty is what makes this happen throw new PropertyException("$" + fillInName(names, start) + " is null. Cannot access ." + names[end]); } } else { return nextProp; } } |
prop, fillInName(names, start), | propName, fillInName(names, start), | public Object getProperty (final Context context, final Object instance, final Object[] names, int start, int end) throws PropertyException { String prop; Object nextProp = null; Accessor acc = null; if (names[start] instanceof String) { prop = (String) names[start]; } else if (names[start] instanceof PropertyMethod) { PropertyMethod pm = (PropertyMethod) names[start]; prop = pm.getName(); acc = (Accessor) _directAccessors.get(prop); Object[] args = pm.getArguments(context); if (acc == null) { if (isMethodRestricted(instance.getClass(), prop)) throw new PropertyException.RestrictedMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } try { nextProp = acc.get(instance, args); start++; } catch (NoSuchMethodException e) { throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } } else { prop = names[start].toString(); } // unary? if (acc == null) { acc = (Accessor) _unaryAccessors.get(prop); if (acc != null) { try { nextProp = acc.get(instance); start++; } catch (NoSuchMethodException e) { acc = null; } } } // binary? if (acc == null) { acc = (Accessor) _binaryAccessors.get(prop); if ((acc != null) && ((start + 1) <= end)) { try { nextProp = acc.get(instance, (String) names[start + 1]); start += 2; } catch (NoSuchMethodException e) { acc = null; } catch (ClassCastException e) { // names[start + 1] was not a String, just move on // this catch is more efficient than using instanceof // since 90% of the time it really will be a string acc = null; } } else { acc = null; } } // hash? if (acc == null) { acc = _hashAccessor; try { if (acc != null) { nextProp = acc.get(instance, prop); start++; } } catch (NoSuchMethodException e) { acc = null; } } if (acc == null) { // user tried to access a property of a property that doesn't exist // ex: $TestObject.FirstName.NotThere // check if object is restricted if (isMethodRestricted(instance.getClass(), "get" + prop) || isMethodRestricted(instance.getClass(), "set" + prop)) throw new PropertyException.RestrictedPropertyException( prop, fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchPropertyException( prop, fillInName(names, start), instance.getClass().getName()); } if (start <= end) { try { return _cache.getOperator(nextProp) .getProperty(context, nextProp, names, start, end); } catch (NullPointerException e) { // $Foo.getNull().SomeProperty is what makes this happen throw new PropertyException("$" + fillInName(names, start) + " is null. Cannot access ." + names[end]); } } else { return nextProp; } } |
return _cache.getOperator(nextProp) .getProperty(context, nextProp, names, start, end); | return _cache.getOperator(nextPropValue) .getProperty(context, nextPropValue, names, start, end); | public Object getProperty (final Context context, final Object instance, final Object[] names, int start, int end) throws PropertyException { String prop; Object nextProp = null; Accessor acc = null; if (names[start] instanceof String) { prop = (String) names[start]; } else if (names[start] instanceof PropertyMethod) { PropertyMethod pm = (PropertyMethod) names[start]; prop = pm.getName(); acc = (Accessor) _directAccessors.get(prop); Object[] args = pm.getArguments(context); if (acc == null) { if (isMethodRestricted(instance.getClass(), prop)) throw new PropertyException.RestrictedMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } try { nextProp = acc.get(instance, args); start++; } catch (NoSuchMethodException e) { throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } } else { prop = names[start].toString(); } // unary? if (acc == null) { acc = (Accessor) _unaryAccessors.get(prop); if (acc != null) { try { nextProp = acc.get(instance); start++; } catch (NoSuchMethodException e) { acc = null; } } } // binary? if (acc == null) { acc = (Accessor) _binaryAccessors.get(prop); if ((acc != null) && ((start + 1) <= end)) { try { nextProp = acc.get(instance, (String) names[start + 1]); start += 2; } catch (NoSuchMethodException e) { acc = null; } catch (ClassCastException e) { // names[start + 1] was not a String, just move on // this catch is more efficient than using instanceof // since 90% of the time it really will be a string acc = null; } } else { acc = null; } } // hash? if (acc == null) { acc = _hashAccessor; try { if (acc != null) { nextProp = acc.get(instance, prop); start++; } } catch (NoSuchMethodException e) { acc = null; } } if (acc == null) { // user tried to access a property of a property that doesn't exist // ex: $TestObject.FirstName.NotThere // check if object is restricted if (isMethodRestricted(instance.getClass(), "get" + prop) || isMethodRestricted(instance.getClass(), "set" + prop)) throw new PropertyException.RestrictedPropertyException( prop, fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchPropertyException( prop, fillInName(names, start), instance.getClass().getName()); } if (start <= end) { try { return _cache.getOperator(nextProp) .getProperty(context, nextProp, names, start, end); } catch (NullPointerException e) { // $Foo.getNull().SomeProperty is what makes this happen throw new PropertyException("$" + fillInName(names, start) + " is null. Cannot access ." + names[end]); } } else { return nextProp; } } |
return nextProp; | return nextPropValue; | public Object getProperty (final Context context, final Object instance, final Object[] names, int start, int end) throws PropertyException { String prop; Object nextProp = null; Accessor acc = null; if (names[start] instanceof String) { prop = (String) names[start]; } else if (names[start] instanceof PropertyMethod) { PropertyMethod pm = (PropertyMethod) names[start]; prop = pm.getName(); acc = (Accessor) _directAccessors.get(prop); Object[] args = pm.getArguments(context); if (acc == null) { if (isMethodRestricted(instance.getClass(), prop)) throw new PropertyException.RestrictedMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } try { nextProp = acc.get(instance, args); start++; } catch (NoSuchMethodException e) { throw new PropertyException.NoSuchMethodException( pm.toString(), fillInName(names, start), instance.getClass().getName()); } } else { prop = names[start].toString(); } // unary? if (acc == null) { acc = (Accessor) _unaryAccessors.get(prop); if (acc != null) { try { nextProp = acc.get(instance); start++; } catch (NoSuchMethodException e) { acc = null; } } } // binary? if (acc == null) { acc = (Accessor) _binaryAccessors.get(prop); if ((acc != null) && ((start + 1) <= end)) { try { nextProp = acc.get(instance, (String) names[start + 1]); start += 2; } catch (NoSuchMethodException e) { acc = null; } catch (ClassCastException e) { // names[start + 1] was not a String, just move on // this catch is more efficient than using instanceof // since 90% of the time it really will be a string acc = null; } } else { acc = null; } } // hash? if (acc == null) { acc = _hashAccessor; try { if (acc != null) { nextProp = acc.get(instance, prop); start++; } } catch (NoSuchMethodException e) { acc = null; } } if (acc == null) { // user tried to access a property of a property that doesn't exist // ex: $TestObject.FirstName.NotThere // check if object is restricted if (isMethodRestricted(instance.getClass(), "get" + prop) || isMethodRestricted(instance.getClass(), "set" + prop)) throw new PropertyException.RestrictedPropertyException( prop, fillInName(names, start), instance.getClass().getName()); throw new PropertyException.NoSuchPropertyException( prop, fillInName(names, start), instance.getClass().getName()); } if (start <= end) { try { return _cache.getOperator(nextProp) .getProperty(context, nextProp, names, start, end); } catch (NullPointerException e) { // $Foo.getNull().SomeProperty is what makes this happen throw new PropertyException("$" + fillInName(names, start) + " is null. Cannot access ." + names[end]); } } else { return nextProp; } } |
int parentPos = names.length - 1; int binPos = parentPos - 1; | int binPos = names.length - 2; | public boolean setProperty (Context context, Object instance, Object[] names, Object value, int pos) throws PropertyException, NoSuchMethodException { // names[pos] is what we could set from here int parentPos = names.length - 1; int binPos = parentPos - 1; // if we're not yet at the binary-settable parent, go there if (pos < binPos) { Object grandparent = getProperty(context, instance, names, pos, binPos - 1); PropertyOperator po = _cache.getOperator(grandparent); return po.setProperty(context, grandparent, names, value, binPos); } // if we're at the binary-settable parent, try direct first if (pos == binPos) { // try direct -- move to direct parent and try from there Object parent = null; try { parent = getProperty(context, instance, names, pos, pos); if (parent != null) { PropertyOperator po = _cache.getOperator(parent); if (po.setProperty(context, parent, names, value, pos + 1)) { return true; } } } catch (NoSuchMethodException e) { // oh well, keep trying: XXX this makes binOp expensive } // if direct failed, try binary Accessor binOp = (Accessor) _binaryAccessors.get(names[pos]); if (binOp != null) { try { return binOp.set(instance, (String) names[pos + 1], value); } catch (ClassCastException e) { // names[pos+1] was not a string, just move on return false; } catch (NoSuchMethodException e) { return false; } } return false; } // we're the direct parent, use unaryOp or hash method Accessor unaryOp = (Accessor) _unaryAccessors.get(names[pos]); try { if ((unaryOp != null) && unaryOp.set(instance, value)) { return true; } if (_hashAccessor != null) { return _hashAccessor.set(instance, (String) names[pos], value); } } catch (NoSuchMethodException e) { // fall through } catch (ClassCastException e) { // names[pos] was not a string, fall through } return false; } |
window.setVisible(false); | window.dispose(); | public void mouseMoved(MouseEvent e) { if(e != null){ mouseEvent = e; } if(!canShowPopup){ return; } int loc = list.locationToIndex(e.getPoint()); Point point = list.indexToLocation(loc); ContactItem item = (ContactItem)model.getElementAt(loc); if (item == null || item.getFullJID() == null) { return; } if (activeItem != null && activeItem == item) { return; } activeItem = item; window.setVisible(false); window = new JWindow(); window.setFocusableWindowState(false); ContactInfo info = new ContactInfo(item); window.getContentPane().add(info); window.pack(); info.setBorder(BorderFactory.createEtchedBorder()); Point mainWindowLocation = SparkManager.getMainWindow().getLocationOnScreen(); Point listLocation = list.getLocationOnScreen(); int x = (int)mainWindowLocation.getX() + SparkManager.getMainWindow().getWidth(); final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); if ((int)screenSize.getWidth() - 250 >= x) { window.setLocation(x, (int)listLocation.getY() + (int)point.getY()); window.setVisible(true); } else { window.setLocation((int)mainWindowLocation.getX() - 250, (int)listLocation.getY() + (int)point.getY()); window.setVisible(true); } } |
generateIDAttributeMapping(out, namespaceMapping, element); | private void generateElementMapping(PrintWriter out, NamespaceMapping namespaceMapping, ElementMapping element) { out.println(); out.println(" <!-- element for type: " + element.getClassName() + " -->"); String localName = element.getElementName(); out.println(" <xs:element name='" + localName + "'>"); out.println(" <xs:complexType>"); int complexCount = 0; for (Iterator iterator = element.getAttributes().iterator(); iterator.hasNext();) { AttributeMapping attributeMapping = (AttributeMapping) iterator.next(); if (!Utils.isSimpleType(attributeMapping.getType())) { complexCount++; } } if (complexCount > 0) { out.println(" <xs:sequence>"); for (Iterator iterator = element.getAttributes().iterator(); iterator.hasNext();) { AttributeMapping attributeMapping = (AttributeMapping) iterator.next(); if (!Utils.isSimpleType(attributeMapping.getType())) { generateElementMappingComplexProperty(out, namespaceMapping, attributeMapping); } } out.println(" </xs:sequence>"); } for (Iterator iterator = element.getAttributes().iterator(); iterator.hasNext();) { AttributeMapping attributeMapping = (AttributeMapping) iterator.next(); if (Utils.isSimpleType(attributeMapping.getType())) { generateElementMappingSimpleProperty(out, attributeMapping); } else if (!attributeMapping.getType().isCollection()) { generateElementMappingComplexPropertyAsRef(out, attributeMapping); } } out.println(" <xs:anyAttribute namespace='##other' processContents='lax'/>"); out.println(" </xs:complexType>"); out.println(" </xs:element>"); out.println(); } |
|
} public void mouseReleased(MouseEvent e) { if (transcriptWindow.getSelectedText() == null) { getChatInputEditor().requestFocus(); } | protected ChatRoom() { chatPanel = new JPanel(new GridBagLayout()); transcriptWindow = new TranscriptWindow(); splitPane = new JSplitPane(); packetIDList = new ArrayList(); notificationLabel = new JLabel(); toolbar = new ChatToolBar(); bottomPanel = new JPanel(); messageListeners = new ArrayList(); transcript = new ArrayList(); editorBar = new JPanel(new FlowLayout(FlowLayout.LEFT, 1, 1)); fileDropListeners = new ArrayList(); transcriptWindow.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { getChatInputEditor().requestFocus(); } }); textScroller = new JScrollPane(transcriptWindow); textScroller.getVerticalScrollBar().addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { mousePressed = true; } public void mouseReleased(MouseEvent e) { mousePressed = false; } }); chatAreaButton = new ChatAreaSendField(SparkRes.getString(SparkRes.SEND)); getChatInputEditor().setSelectedTextColor((Color)UIManager.get("ChatInput.SelectedTextColor")); getChatInputEditor().setSelectionColor((Color)UIManager.get("ChatInput.SelectionColor")); init(); // Initally, set the right pane to null to keep it empty. getSplitPane().setRightComponent(null); notificationLabel.setIcon(SparkRes.getImageIcon(SparkRes.BLANK_IMAGE)); getTranscriptWindow().addContextMenuListener(new ContextMenuListener() { public void poppingUp(Object component, JPopupMenu popup) { Action saveAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { saveTranscript(); } }; saveAction.putValue(Action.NAME, "Save"); saveAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.SAVE_AS_16x16)); popup.add(saveAction); } public void poppingDown(JPopupMenu popup) { } public boolean handleDefaultAction(MouseEvent e) { return false; } }); this.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("F12"), "showDebugger"); this.getActionMap().put("showDebugger", new AbstractAction("showDebugger") { public void actionPerformed(ActionEvent evt) { EnhancedDebuggerWindow window = EnhancedDebuggerWindow.getInstance(); window.setVisible(true); } }); getTranscriptWindow().setTransferHandler(new ChatRoomTransferHandler(this)); getChatInputEditor().setTransferHandler(new ChatRoomTransferHandler(this)); add(toolbar, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); } |
|
FastWriter fw = new FastWriter(os, "UTF8"); | FastWriter fw = new FastWriter(os, data.getEncoding()); | public final Object evaluate(Context data) { try { ByteArrayOutputStream os = new ByteArrayOutputStream(512); FastWriter fw = new FastWriter(os, "UTF8"); write(fw,data); fw.flush(); return os.toString("UTF8"); } catch (IOException e) { _log.exception(e); _log.error("Template: Could not write to ByteArrayOutputStream!"); return null; } } |
return os.toString("UTF8"); | return os.toString(data.getEncoding()); | public final Object evaluate(Context data) { try { ByteArrayOutputStream os = new ByteArrayOutputStream(512); FastWriter fw = new FastWriter(os, "UTF8"); write(fw,data); fw.flush(); return os.toString("UTF8"); } catch (IOException e) { _log.exception(e); _log.error("Template: Could not write to ByteArrayOutputStream!"); return null; } } |
globalProjectData = new ProjectData(); | public static ProjectData getGlobalProjectData() { if (globalProjectData != null) return globalProjectData; initialize(); globalProjectData = new ProjectData(); return globalProjectData; } |
|
assertStringTemplateEquals(tmpl, ""); | public void testBinarySetBoolean() throws Exception { String tmpl = "#set $TestObject.Bool=true"; assertTrue(to.bool); } |
|
public JContactItemField(List items, Window parentWindow) { | public JContactItemField(List items) { | public JContactItemField(List items, Window parentWindow) { setLayout(new BorderLayout()); this.items = items; add(textField, BorderLayout.CENTER); textField.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent keyEvent) { char ch = keyEvent.getKeyChar(); if (validateChar(ch)) { showPopupMenu(); } if (ch == KeyEvent.VK_ENTER) { int index = list.getSelectedIndex(); if (index >= 0) { ContactItem selection = (ContactItem)list.getSelectedValue(); textField.setText(selection.getNickname()); popup.setVisible(false); } } if (ch == KeyEvent.VK_ESCAPE) { popup.setVisible(false); } dispatchEvent(keyEvent); } public void keyPressed(KeyEvent e) { if (isArrowKey(e)) { list.dispatchEvent(e); } } }); list.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent keyEvent) { if (keyEvent.getKeyCode() == KeyEvent.VK_ESCAPE) { textField.requestFocus(); } } }); popup = new JWindow(parentWindow); popup.getContentPane().add(new JScrollPane(list)); list.setCellRenderer(new PopupRenderer()); } |
list.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent keyEvent) { if (keyEvent.getKeyCode() == KeyEvent.VK_ESCAPE) { textField.requestFocus(); } } }); popup = new JWindow(parentWindow); | popup = new JWindow(); | public JContactItemField(List items, Window parentWindow) { setLayout(new BorderLayout()); this.items = items; add(textField, BorderLayout.CENTER); textField.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent keyEvent) { char ch = keyEvent.getKeyChar(); if (validateChar(ch)) { showPopupMenu(); } if (ch == KeyEvent.VK_ENTER) { int index = list.getSelectedIndex(); if (index >= 0) { ContactItem selection = (ContactItem)list.getSelectedValue(); textField.setText(selection.getNickname()); popup.setVisible(false); } } if (ch == KeyEvent.VK_ESCAPE) { popup.setVisible(false); } dispatchEvent(keyEvent); } public void keyPressed(KeyEvent e) { if (isArrowKey(e)) { list.dispatchEvent(e); } } }); list.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent keyEvent) { if (keyEvent.getKeyCode() == KeyEvent.VK_ESCAPE) { textField.requestFocus(); } } }); popup = new JWindow(parentWindow); popup.getContentPane().add(new JScrollPane(list)); list.setCellRenderer(new PopupRenderer()); } |
case 0: jj_consume_token(0); {if (true) throw new ParseException("Encountered EOF, expecting #end at " + token.beginLine + "." + token.beginColumn);} break; | final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(templateName); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case END: case BEGIN: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[84] = jj_gen; break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case END: case BEGIN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[85] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[86] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[87] = jj_gen; ; } label_14: while (true) { if (jj_2_21(1)) { ; } else { break label_14; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case RBRACE: case LBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[88] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[89] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case END: jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[90] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); } |
|
if (jj_3R_44()) { jj_scanpos = xsp; | final private boolean jj_3R_23() { Token xsp; xsp = jj_scanpos; if (jj_3R_44()) { jj_scanpos = xsp; if (jj_3R_45()) { jj_scanpos = xsp; if (jj_3R_46()) { jj_scanpos = xsp; if (jj_3R_47()) { jj_scanpos = xsp; if (jj_3R_48()) { jj_scanpos = xsp; if (jj_3R_49()) { jj_scanpos = xsp; if (jj_3R_50()) { jj_scanpos = xsp; if (jj_3R_51()) { jj_scanpos = xsp; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) { jj_scanpos = xsp; if (jj_3R_54()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
|
if (jj_3R_54()) return true; | if (jj_3R_54()) { jj_scanpos = xsp; if (jj_3R_55()) return true; | final private boolean jj_3R_23() { Token xsp; xsp = jj_scanpos; if (jj_3R_44()) { jj_scanpos = xsp; if (jj_3R_45()) { jj_scanpos = xsp; if (jj_3R_46()) { jj_scanpos = xsp; if (jj_3R_47()) { jj_scanpos = xsp; if (jj_3R_48()) { jj_scanpos = xsp; if (jj_3R_49()) { jj_scanpos = xsp; if (jj_3R_50()) { jj_scanpos = xsp; if (jj_3R_51()) { jj_scanpos = xsp; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) { jj_scanpos = xsp; if (jj_3R_54()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_3R_55()) { jj_scanpos = xsp; | final private boolean jj_3R_30() { Token xsp; xsp = jj_scanpos; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; if (jj_3R_57()) { jj_scanpos = xsp; if (jj_3R_58()) { jj_scanpos = xsp; if (jj_3R_59()) { jj_scanpos = xsp; if (jj_3R_60()) { jj_scanpos = xsp; if (jj_3R_61()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
|
if (jj_3R_61()) return true; | if (jj_3R_61()) { jj_scanpos = xsp; if (jj_3R_62()) return true; | final private boolean jj_3R_30() { Token xsp; xsp = jj_scanpos; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; if (jj_3R_57()) { jj_scanpos = xsp; if (jj_3R_58()) { jj_scanpos = xsp; if (jj_3R_59()) { jj_scanpos = xsp; if (jj_3R_60()) { jj_scanpos = xsp; if (jj_3R_61()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_3R_62()) return true; | if (jj_3R_63()) return true; | final private boolean jj_3R_41() { if (jj_3R_62()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
Token xsp; xsp = jj_scanpos; if (jj_3R_63()) { jj_scanpos = xsp; if (jj_3R_64()) return true; | if (jj_scan_token(0)) return true; | final private boolean jj_3R_42() { Token xsp; xsp = jj_scanpos; if (jj_3R_63()) { jj_scanpos = xsp; if (jj_3R_64()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_42() { Token xsp; xsp = jj_scanpos; if (jj_3R_63()) { jj_scanpos = xsp; if (jj_3R_64()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
|
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_43() { if (jj_3R_65()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
|
if (jj_scan_token(LPAREN)) return true; | if (jj_3R_67()) return true; | final private boolean jj_3R_45() { if (jj_scan_token(LPAREN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_3R_67()) return true; | if (jj_scan_token(LPAREN)) return true; | final private boolean jj_3R_46() { if (jj_3R_67()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(NULL)) return true; | if (jj_3R_69()) return true; | final private boolean jj_3R_48() { if (jj_scan_token(NULL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(TRUE)) return true; | if (jj_scan_token(NULL)) return true; | final private boolean jj_3R_49() { if (jj_scan_token(TRUE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(FALSE)) return true; | if (jj_scan_token(TRUE)) return true; | final private boolean jj_3R_50() { if (jj_scan_token(FALSE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(UNDEFINED)) return true; | if (jj_scan_token(FALSE)) return true; | final private boolean jj_3R_51() { if (jj_scan_token(UNDEFINED)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(OP_NOT)) return true; | if (jj_scan_token(UNDEFINED)) return true; | final private boolean jj_3R_52() { if (jj_scan_token(OP_NOT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(NUMBER)) return true; | if (jj_scan_token(OP_NOT)) return true; | final private boolean jj_3R_53() { if (jj_scan_token(NUMBER)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(OP_MINUS)) return true; | if (jj_scan_token(NUMBER)) return true; | final private boolean jj_3R_54() { if (jj_scan_token(OP_MINUS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(OP_EQ)) return true; | if (jj_scan_token(OP_MINUS)) return true; | final private boolean jj_3R_55() { if (jj_scan_token(OP_EQ)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(OP_SET)) return true; | if (jj_scan_token(OP_EQ)) return true; | final private boolean jj_3R_56() { if (jj_scan_token(OP_SET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(OP_NE)) return true; | if (jj_scan_token(OP_SET)) return true; | final private boolean jj_3R_57() { if (jj_scan_token(OP_NE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(OP_GT)) return true; | if (jj_scan_token(OP_NE)) return true; | final private boolean jj_3R_58() { if (jj_scan_token(OP_GT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(OP_GE)) return true; | if (jj_scan_token(OP_GT)) return true; | final private boolean jj_3R_59() { if (jj_scan_token(OP_GE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(OP_LE)) return true; | if (jj_scan_token(OP_GE)) return true; | final private boolean jj_3R_60() { if (jj_scan_token(OP_LE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(OP_LT)) return true; | if (jj_scan_token(OP_LE)) return true; | final private boolean jj_3R_61() { if (jj_scan_token(OP_LT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
Token xsp; xsp = jj_scanpos; if (jj_3R_69()) { jj_scanpos = xsp; if (jj_3R_70()) { jj_scanpos = xsp; if (jj_3R_71()) { jj_scanpos = xsp; if (jj_3R_72()) { jj_scanpos = xsp; if (jj_3R_73()) return true; | if (jj_scan_token(OP_LT)) return true; | final private boolean jj_3R_62() { Token xsp; xsp = jj_scanpos; if (jj_3R_69()) { jj_scanpos = xsp; if (jj_3R_70()) { jj_scanpos = xsp; if (jj_3R_71()) { jj_scanpos = xsp; if (jj_3R_72()) { jj_scanpos = xsp; if (jj_3R_73()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_62() { Token xsp; xsp = jj_scanpos; if (jj_3R_69()) { jj_scanpos = xsp; if (jj_3R_70()) { jj_scanpos = xsp; if (jj_3R_71()) { jj_scanpos = xsp; if (jj_3R_72()) { jj_scanpos = xsp; if (jj_3R_73()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
|
if (jj_scan_token(LBRACE)) return true; | Token xsp; xsp = jj_scanpos; if (jj_3R_70()) { jj_scanpos = xsp; if (jj_3R_71()) { jj_scanpos = xsp; if (jj_3R_72()) { jj_scanpos = xsp; if (jj_3R_73()) { jj_scanpos = xsp; if (jj_3R_74()) return true; | final private boolean jj_3R_63() { if (jj_scan_token(LBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_63() { if (jj_scan_token(LBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
|
if (jj_scan_token(RBRACE)) return true; | if (jj_scan_token(LBRACE)) return true; | final private boolean jj_3R_64() { if (jj_scan_token(RBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(POUND)) return true; | if (jj_scan_token(RBRACE)) return true; | final private boolean jj_3R_65() { if (jj_scan_token(POUND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(DOLLAR)) return true; | if (jj_scan_token(POUND)) return true; | final private boolean jj_3R_66() { if (jj_scan_token(DOLLAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
Token xsp; xsp = jj_scanpos; if (jj_3R_74()) { jj_scanpos = xsp; if (jj_3R_75()) return true; | if (jj_scan_token(DOLLAR)) return true; | final private boolean jj_3R_67() { Token xsp; xsp = jj_scanpos; if (jj_3R_74()) { jj_scanpos = xsp; if (jj_3R_75()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_67() { Token xsp; xsp = jj_scanpos; if (jj_3R_74()) { jj_scanpos = xsp; if (jj_3R_75()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
|
if (jj_scan_token(LBRACKET)) return true; | Token xsp; xsp = jj_scanpos; if (jj_3R_75()) { jj_scanpos = xsp; if (jj_3R_76()) return true; | final private boolean jj_3R_68() { if (jj_scan_token(LBRACKET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_68() { if (jj_scan_token(LBRACKET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
|
if (jj_scan_token(STUFF)) return true; | if (jj_scan_token(LBRACKET)) return true; | final private boolean jj_3R_69() { if (jj_scan_token(STUFF)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
if (jj_scan_token(QCHAR)) return true; | if (jj_scan_token(STUFF)) return true; | final private boolean jj_3R_70() { if (jj_scan_token(QCHAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
Subsets and Splits