/** * @deprecated Use {@link BaseFunction#getFunctionName()} instead. * For backwards compatibility keep an old method name used by * Batik and possibly others. */ public String jsGet_name() { return getFunctionName(); }
String name = function.getFunctionName(); if (name != null && name.length() != 0) { if (!fromEvalCode) { String name = function.getFunctionName(); if (name != null && name.length() != 0) {
private static String stringValue(final Object arg) { if (arg instanceof NativeFunction) { // Don't return the string value of the function, because it's usually // multiple lines of content and messes up the log. final String name = StringUtils.defaultIfEmpty(((NativeFunction) arg).getFunctionName(), "anonymous"); return "[function " + name + "]"; } else if (arg instanceof IdFunctionObject) { return "[function " + ((IdFunctionObject) arg).getFunctionName() + "]"; } else if (arg instanceof Function) { return "[function anonymous]"; } String asString = null; try { // try to get the js representation asString = Context.toString(arg); if (arg instanceof Event) { asString += "<" + ((Event) arg).getType() + ">"; } } catch (final Throwable e) { // seems to be a bug (many bugs) in rhino (TODO: investigate it) asString = String.valueOf(arg); } return asString; }
private static String stringValue(final Object arg) { if (arg instanceof NativeFunction) { // Don't return the string value of the function, because it's usually // multiple lines of content and messes up the log. final String name = StringUtils.defaultIfEmpty(((NativeFunction) arg).getFunctionName(), "anonymous"); return "[function " + name + "]"; } else if (arg instanceof IdFunctionObject) { return "[function " + ((IdFunctionObject) arg).getFunctionName() + "]"; } else if (arg instanceof Function) { return "[function anonymous]"; } String asString = null; try { // try to get the js representation asString = Context.toString(arg); if (arg instanceof Event) { asString += "<" + ((Event) arg).getType() + ">"; } } catch (final Throwable e) { // seems to be a bug (many bugs) in rhino (TODO: investigate it) asString = String.valueOf(arg); } return asString; }
private String stringValue(final Object arg) { if (arg instanceof NativeFunction) { // Don't return the string value of the function, because it's usually // multiple lines of content and messes up the log. final String name = StringUtils.defaultIfEmpty(((NativeFunction) arg).getFunctionName(), "anonymous"); return "[function " + name + "]"; } else if (arg instanceof IdFunctionObject) { return "[function " + ((IdFunctionObject) arg).getFunctionName() + "]"; } else if (arg instanceof Function) { return "[function anonymous]"; } String asString = null; try { // try to get the js representation asString = Context.toString(arg); if (arg instanceof Event) { asString += "<" + ((Event) arg).jsxGet_type() + ">"; } } catch (final Throwable e) { // seems to be a bug (many bugs) in rhino (TODO: investigate it) asString = String.valueOf(arg); } return asString; }
private String stringValue(final Object arg) { if (arg instanceof NativeFunction) { // Don't return the string value of the function, because it's usually // multiple lines of content and messes up the log. final String name = StringUtils.defaultIfEmpty(((NativeFunction) arg).getFunctionName(), "anonymous"); return "[function " + name + "]"; } else if (arg instanceof IdFunctionObject) { return "[function " + ((IdFunctionObject) arg).getFunctionName() + "]"; } else if (arg instanceof Function) { return "[function anonymous]"; } String asString = null; try { // try to get the js representation asString = Context.toString(arg); if (arg instanceof Event) { asString += "<" + ((Event) arg).jsxGet_type() + ">"; } } catch (final Throwable e) { // seems to be a bug (many bugs) in rhino (TODO: investigate it) asString = String.valueOf(arg); } return asString; }
private String stringValue(final Object arg) { if (arg instanceof NativeFunction) { // Don't return the string value of the function, because it's usually // multiple lines of content and messes up the log. final String name = StringUtils.defaultIfEmpty(((NativeFunction) arg).getFunctionName(), "anonymous"); return "[function " + name + "]"; } else if (arg instanceof IdFunctionObject) { return "[function " + ((IdFunctionObject) arg).getFunctionName() + "]"; } else if (arg instanceof Function) { return "[function anonymous]"; } String asString = null; try { // try to get the js representation asString = Context.toString(arg); if (arg instanceof Event) { asString += "<" + ((Event) arg).jsxGet_type() + ">"; } } catch (final Throwable e) { // seems to be a bug (many bugs) in rhino (TODO: investigate it) asString = String.valueOf(arg); } return asString; }