@@ -0,0 +1,1037 @@
+package net.cattaka.util.cathandsgendroid.apt.util;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport javax.lang.model.type.DeclaredType;%0Aimport javax.lang.model.type.TypeMirror;%0A%0Apublic class Functions %7B%0A    public static String join(List%3C?%3E objects, String delim) %7B%0A        if (objects == null) %7B%0A            return %22%22;%0A        %7D%0A        StringBuilder sb = new StringBuilder();%0A        int i = 0;%0A        for (Object object : objects) %7B%0A            if (i %3E 0) %7B%0A                sb.append(delim);%0A            %7D%0A            sb.append(String.valueOf(object));%0A            i++;%0A        %7D%0A        return sb.toString();%0A    %7D%0A    %0A    public static List%3CString%3E pullTypes(DeclaredType tm) %7B%0A        List%3CString%3E results = new ArrayList%3CString%3E();%0A        results.add(String.valueOf(tm.asElement()));%0A        if (tm instanceof DeclaredType) %7B%0A            for (TypeMirror t : ((DeclaredType)tm).getTypeArguments()) %7B%0A                results.addAll(pullTypes((DeclaredType)t));%0A            %7D%0A        %7D%0A        return results;%0A    %7D%0A%7D%0A

Add Functions