public static void main(String args[]) { AClass aObject = new AClass(); DClass dObject = new DClass(); System.out.println("Call 1 - calling a1method with 2 as input"); String output = aObject.a1method("2.0"); System.out.println("Output = " + output); System.out.println("\n\nCall 2 - calling d2method with 5.0 as input"); output = dObject.d2method("5.0"); System.out.println("Output = " + output); }
public static void printConstructors(AClass aClass) { Class c = aClass.getClass(); // 获取指定类的类名 String className = c.getName(); try { // 获取指定类的构造方法 Constructor[] theConstructors = c.getConstructors(); for (int i = 0; i < theConstructors.length; i++) { // 获取指定构造方法的参数的集合 Class[] parameterTypes = theConstructors[i].getParameterTypes(); System.out.print(className + "("); for (int j = 0; j < parameterTypes.length; j++) System.out.print(parameterTypes[j].getName() + " "); System.out.println(")"); } } catch (Exception e) { e.printStackTrace(); } }
public static void main(String[] args) { AClass.invokedByExternalIntegrationTest(); }
@Test public void simpleIntegrationTest() { AClass.invokedByIntegrationTest(); }
void appendReturnType(IndentingStringWriter writer) throws IOException { returnType.appendSource(writer); writer.append(" "); }
public Set<AClass> getImports() { Set<AClass> imports = extractImportsFrom(annotations, parameters, exceptions); imports.addAll(returnType.getImports()); return imports; }
@Override public String encode(AClass aClass) throws EncodeException { return aClass.toString(); }