public Object parse(CharSequence csq, Cursor cursor) { CharSequence className = cursor.nextToken(csq, CharSet.WHITESPACES); if (className == null) throw new IllegalArgumentException("No class name found"); Class cls = Reflection.getInstance().getClass(className); if (cls != null) return cls; throw new IllegalArgumentException("Class \"" + className + "\" not found (see javolution.lang.Reflection)"); } };
/** * Equivalent to {@link #getClass(CharSequence)} (for J2ME compatibility). */ public Class getClass(String name) { Object obj = name; if (obj instanceof CharSequence) return getClass((CharSequence) obj); // String not a CharSequence on J2ME TextBuilder tmp = TextBuilder.newInstance(); try { tmp.append(name); return getClass(tmp); } finally { TextBuilder.recycle(tmp); } }
String arrayName = structs.getClass().getName(); String structName = arrayName.substring(2, arrayName.length() - 1); structClass = Reflection.getInstance().getClass(structName); if (structClass == null) { throw new IllegalArgumentException("Struct class: " + structName + " not found");
String className = name.substring(0, sep); String fieldName = name.substring(sep + 1); Class cls = Reflection.getInstance().getClass(className); if (cls == null) { LogContext.warning("Class " + className + " not found");
/** * Initializes the class with the specified name. * * @param className the name of the class to initialize. */ public static void initialize(String className) { try { Class cls = Reflection.getInstance().getClass(className); if (cls == null) { LogContext.warning("Class + " + className + " not found"); } } catch (Throwable error) { LogContext.error(error); } }
cls = Reflection.getInstance().getClass(classQName.getLocalName()); if (cls == null) throw new XMLStreamException("Class " + classQName.getLocalName() +