@Override public boolean test(MethodInfo method) { return method.hasAnnotation(type); }
@Override public boolean test(MethodInfo method) { return method.hasAnnotation(type); }
private static List<Property> of0(Mode mode, TypeInfo typeInfo) { Naming naming = Naming.of(typeInfo); return typeInfo.methodInfoStream() .filter(m -> m.hasModifierInfo(ModifierInfo.ABSTRACT)) .filter(m -> !m.hasReturnTypeInfo(SimpleTypePrimitives.VOID)) .filter(m -> m.hasParameterInfoListSize(0)) .filter(m -> !m.hasAnnotation(Invalidate.class)) .map(m -> new Property(mode, naming, m)) .collect(MoreCollectors.toImmutableList()); }
private static List<Property> of0(Mode mode, TypeInfo typeInfo) { Naming naming = Naming.of(typeInfo); return typeInfo.methodInfoStream() .filter(m -> m.hasModifierInfo(ModifierInfo.ABSTRACT)) .filter(m -> !m.hasReturnTypeInfo(SimpleTypePrimitives.VOID)) .filter(m -> m.hasParameterInfoListSize(0)) .filter(m -> !m.hasAnnotation(Invalidate.class)) .map(m -> new Property(mode, naming, m)) .collect(MoreCollectors.toImmutableList()); }
public static RepoType of(TypeInfo typeInfo) { List<RepoQueryMethod> queryMethodList = typeInfo.methodInfoStream() .filter(m -> m.hasAnnotation(Query.class)) .map(RepoQueryMethod::ofRepo) .filter(Optional::isPresent) .map(Optional::get) .collect(MoreCollectors.toImmutableList()); return RepoType.builder() .superTypeName(typeInfo.typeName()) .repoClassName(typeInfo.classNameSuffix("Repo")) .queryMethodList(queryMethodList) .build(); }
private static OrmPojoInfo of1(PojoInfo pojoInfo, List<OrmProperty> propertyList, OrmPropertyHelper helper) { TableInfoMap tableInfoMap = helper.tableInfoMap(); return OrmPojoInfo.builder() .pojoInfo(pojoInfo) .propertyList(propertyList) .columnPropertyList(helper.columnPropertyList()) .foreignKeyPropertyList(helper.foreignKeyPropertyList()) .queryMethodList(pojoInfo.methodInfoStream() .filter(m -> m.hasAnnotation(Query.class)) .map(PojoQueryMethod::of) .filter(Optional::isPresent) .map(Optional::get) .collect(MoreCollectors.toImmutableList())) .tableInfoMap(tableInfoMap) .insertable(tableInfoMap.toOrmInsertable(pojoInfo)) .build(); }