public String getAbsoluteName() { if (firstUnion > start) { return new String(expr, start, getAbsoluteFirstPart() - start); } else { return getName(); } }
public String getAbsoluteName() { if (firstUnion > start) { return new String(expr, start, getAbsoluteFirstPart() - start); } else { return getName(); } }
public String getAbsoluteName() { if (firstUnion > 0) { return new String(name, 0, getAbsoluteFirstPart()); } else { return getName(); } }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { try { Class i = (Class) clsStmt.getReducedValue(ctx, thisValue, factory); if (i == null) throw new ClassCastException(); return i.isInstance(stmt.getReducedValue(ctx, thisValue, factory)); } catch (ClassCastException e) { throw new RuntimeException("not a class reference: " + clsStmt.getName()); } }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { try { Class i = (Class) clsStmt.getReducedValue(ctx, thisValue, factory); if (i == null) throw new ClassCastException(); return i.isInstance(stmt.getReducedValue(ctx, thisValue, factory)); } catch (ClassCastException e) { throw new RuntimeException("not a class reference: " + clsStmt.getName()); } }
public int doAfter(Object val, ASTNode node, VariableResolverFactory factory) { System.out.println("AFTER Node: " + node.getName()); return 0; } };
public int doBefore(ASTNode node, VariableResolverFactory factory) { System.out.println("BEFORE Node: " + node.getName()); return 0; }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { try { Object o = stmt.getReducedValue(ctx, thisValue, factory); if (o == null) return false; Class i = (Class) clsStmt.getReducedValue(ctx, thisValue, factory); if (i == null) throw new ClassCastException(); return DataConversion.canConvert(i, o.getClass()); } catch (ClassCastException e) { throw new RuntimeException("not a class reference: " + clsStmt.getName()); } }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { try { Object o = stmt.getReducedValue(ctx, thisValue, factory); if (o == null) return false; Class i = (Class) clsStmt.getReducedValue(ctx, thisValue, factory); if (i == null) throw new ClassCastException(); return DataConversion.canConvert(i, o.getClass()); } catch (ClassCastException e) { throw new RuntimeException("not a class reference: " + clsStmt.getName()); } }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { try { String i = String.valueOf(soundslike.getReducedValue(ctx, thisValue, factory)); if (i == null) throw new ClassCastException(); String x = (String) stmt.getReducedValue(ctx, thisValue, factory); if (x == null) throw new CompileException("not a string: " + stmt.getName()); return similarity(i,x); } catch (ClassCastException e) { throw new CompileException("not a string: " + soundslike.getName()); } }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { try { Class i = (Class) clsStmt.getReducedValue(ctx, thisValue, factory); if (i == null) throw new ClassCastException(); return i.isInstance(stmt.getReducedValue(ctx, thisValue, factory)); } catch (ClassCastException e) { throw new CompileException("not a class reference: " + clsStmt.getName()); } }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { try { String i = String.valueOf(soundslike.getReducedValue(ctx, thisValue, factory)); if (i == null) throw new ClassCastException(); String x = (String) stmt.getReducedValue(ctx, thisValue, factory); if (x == null) throw new CompileException("not a string: " + stmt.getName()); return soundex(i).equals(soundex(x)); } catch (ClassCastException e) { throw new CompileException("not a string: " + soundslike.getName()); } }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { try { Object o = stmt.getReducedValue(ctx, thisValue, factory); if (o == null) return false; Class i = (Class) clsStmt.getReducedValue(ctx, thisValue, factory); if (i == null) throw new ClassCastException(); return DataConversion.canConvert(i,o.getClass()); } catch (ClassCastException e) { throw new CompileException("not a class reference: " + clsStmt.getName()); } }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { try { String i = String.valueOf(soundslike.getReducedValue(ctx, thisValue, factory)); if (i == null) throw new ClassCastException(); String x = (String) stmt.getReducedValue(ctx, thisValue, factory); if (x == null) throw new CompileException("not a string: " + stmt.getName(), stmt.getExpr(), getStart()); return similarity(i, x); } catch (ClassCastException e) { throw new CompileException("not a string: " + soundslike.getName(), soundslike.getExpr(), soundslike.getStart()); } }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { try { String i = String.valueOf(soundslike.getReducedValue(ctx, thisValue, factory)); if (i == null) throw new ClassCastException(); String x = (String) stmt.getReducedValue(ctx, thisValue, factory); if (x == null) throw new CompileException("not a string: " + stmt.getName(), stmt.getExpr(), stmt.getStart()); return soundex(i).equals(soundex(x)); } catch (ClassCastException e) { throw new CompileException("not a string: " + soundslike.getName(), soundslike.getExpr(), soundslike.getStart()); } }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { try { String i = String.valueOf(soundslike.getReducedValue(ctx, thisValue, factory)); if (i == null) throw new ClassCastException(); String x = (String) stmt.getReducedValue(ctx, thisValue, factory); if (x == null) throw new CompileException("not a string: " + stmt.getName(), stmt.getExpr(), getStart()); return similarity(i, x); } catch (ClassCastException e) { throw new CompileException("not a string: " + soundslike.getName(), soundslike.getExpr(), soundslike.getStart()); } }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { try { String i = String.valueOf(soundslike.getReducedValue(ctx, thisValue, factory)); if (i == null) throw new ClassCastException(); String x = (String) stmt.getReducedValue(ctx, thisValue, factory); if (x == null) throw new CompileException("not a string: " + stmt.getName(), stmt.getExpr(), stmt.getStart()); return soundex(i).equals(soundex(x)); } catch (ClassCastException e) { throw new CompileException("not a string: " + soundslike.getName(), soundslike.getExpr(), soundslike.getStart()); } }
public static Class determineType(String name, CompiledExpression compiledExpression) { ASTIterator iter = new ASTLinkedList(compiledExpression.getFirstNode()); ASTNode node; while (iter.hasMoreNodes()) { if (name.equals((node = iter.nextNode()).getName()) && node.isAssignment()) { return node.getEgressType(); } } return null; }
public static Class determineType(String name, CompiledExpression compiledExpression) { ASTIterator iter = new ASTLinkedList(compiledExpression.getFirstNode()); ASTNode node; while (iter.hasMoreNodes()) { if (name.equals((node = iter.nextNode()).getName()) && node.isAssignment()) { return node.getEgressType(); } } return null; }
public static Class determineType(String name, CompiledExpression compiledExpression) { ASTIterator iter = new ASTLinkedList(compiledExpression.getFirstNode()); ASTNode node; while (iter.hasMoreNodes()) { if (name.equals((node = iter.nextNode()).getName()) && node.isAssignment()) { return node.getEgressType(); } } return null; }