예제 #1
0
 public static lombok.ast.pg.TypeRef boxedType(final JCExpression type) {
   if (type == null) return null;
   lombok.ast.pg.TypeRef boxedType = Type(type);
   if (type instanceof JCPrimitiveTypeTree) {
     final String name = type.toString();
     if ("int".equals(name)) {
       boxedType = Type(Integer.class);
     } else if ("char".equals(name)) {
       boxedType = Type(Character.class);
     } else if (Is.oneOf(name, "void", "boolean", "float", "double", "byte", "short", "long")) {
       boxedType = Type("java.lang." + capitalize(name));
     }
   }
   return boxedType;
 }
예제 #2
0
 public boolean hasMultiArgumentConstructor() {
   for (AbstractMethodDeclaration def : Each.elementIn(get().methods)) {
     if ((def instanceof ConstructorDeclaration) && Is.notEmpty(def.arguments)) return true;
   }
   return false;
 }