@Override public InterfaceInfoMap apply(List<InterfaceInfo> input) { return InterfaceInfoMap.mapOf(input); } });
public static InterfaceInfoMap mapOf(List<InterfaceInfo> list) { return new InterfaceInfoMap(list); }
private TypeInfoMap(List<TypeInfo> list) { this.list = list; interfaceInfoMap = InterfaceInfoMap.fromTypeInfoList(list); }
InterfaceInfoMap getInterfaceInfoMap() { SuperTypeInfo superTypeInfo = superTypeInfo().or(SuperTypeInfoVoid.get()); InterfaceInfoMap thisMap = interfaceInfoMap(); return thisMap.add(superTypeInfo.getInterfaceInfoMap()); }
public WayIterable<MethodInfo> getMethodInfoIterable() { List<MethodInfo> methodList = methodInfoMap().list(); InterfaceInfoMap interfaceInfoMap = interfaceInfoMap(); return WayIterables.from(interfaceInfoMap.list()) .transformAndConcat(InterfaceInfoGetMethodInfoList.get()) .addAll(superTypeInfoMethodList()) .filter(MethodInfoHasSameSignature.not(methodList)) .addAll(methodList); }
public Optional<InterfaceInfo> getInterface(Class<?> type) { Optional<InterfaceInfo> res = Optional.absent(); if (type.isInterface()) { InterfaceInfoMap interfaceInfoMap = getInterfaceInfoMap(); res = interfaceInfoMap.get(type); } return res; }
InterfaceInfoMap getInterfaceInfoMap() { SuperTypeInfo superTypeInfo = superTypeInfo().or(SuperTypeInfoVoid.get()); InterfaceInfoMap thisMap = interfaceInfoMap(); return thisMap.add(superTypeInfo.getInterfaceInfoMap()); }
public WayIterable<MethodInfo> getMethodInfoIterable() { List<MethodInfo> methodList = methodInfoMap().list(); InterfaceInfoMap interfaceInfoMap = interfaceInfoMap(); return WayIterables.from(interfaceInfoMap.list()) .transformAndConcat(InterfaceInfoGetMethodInfoList.get()) .addAll(superTypeInfoMethodList()) .filter(MethodInfoHasSameSignature.not(methodList)) .addAll(methodList); }
@Override InterfaceInfoMap getInterfaceInfoMap() { return InterfaceInfoMap.mapOf(); }
@Override public InterfaceInfoMap getInterfaceInfoMap() { return InterfaceInfoMap.mapOf(); }
public InterfaceInfoMap add(InterfaceInfoMap otherMap) { List<InterfaceInfo> add = ImmutableList.<InterfaceInfo> builder() .addAll(list) .addAll(otherMap.list) .build(); return InterfaceInfoMap.mapOf(add); }
public static InterfaceInfoMap interfaceInfoMapOf(ProcessingEnvironmentWrapper processingEnv, TypeElement element) { List<InterfaceInfo> list = element.getInterfaces().stream() .map(type -> TypeInfoTypeMirror.wrap(processingEnv, type)) .map(TypeInfo::toInterfaceInfo) .filter(Optional::isPresent) .map(Optional::get) .collect(Collectors.toList()); return InterfaceInfoMap.mapOf(list); }
public static InterfaceInfoMap fromTypeInfoList(List<TypeInfo> list) { List<Optional<InterfaceInfo>> optionalList = transform(list, TypeInfoToInterfaceInfo.get()); Iterable<InterfaceInfo> presentList = Optional.presentInstances(optionalList); List<InterfaceInfo> interfaceInfoList = ImmutableList.copyOf(presentList); return mapOf(interfaceInfoList); }
public static InterfaceInfoMap interfaceInfoMapOf(ProcessingEnvironmentWrapper processingEnv, TypeMirror type) { InterfaceInfoMap map = InterfaceInfoMap.mapOf(); Element element = processingEnv.asElement(type); if (isType(element)) { TypeElement typeElement = TypeElement.class.cast(element); map = interfaceInfoMapOf(processingEnv, typeElement); } return map; }
public static InterfaceInfoMap interfaceInfoMapOf(ProcessingEnvironmentWrapper processingEnv, TypeMirror type) { InterfaceInfoMap map = InterfaceInfoMap.mapOf(); Element element = processingEnv.asElement(type); if (isType(element)) { TypeElement typeElement = TypeElement.class.cast(element); map = interfaceInfoMapOf(processingEnv, typeElement); } return map; }
@Override public SuperTypeInfo build() { return SuperTypeInfo.builder() .superTypeInfo(Optional.fromNullable(superTypeInfo)) .interfaceInfoMap(InterfaceInfoMap.mapOf(interfaceInfoList)) .methodInfoMap(MethodInfoMap.mapOf(methodInfoList)) .build(); }
public SuperTypeInfo build() { return TestingSuperTypeInfo.builder() .annotationInfoList(annotationInfoList) .superTypeInfo(Optional.ofNullable(superTypeInfo)) .interfaceInfoMap(InterfaceInfoMap.mapOf(interfaceInfoList)) .methodInfoList(methodInfoList) .build(); }
@Override public TypeInfo build() { return TypeInfo.newPojo() .kind(kind) .packageInfo(packageInfo) .accessInfo(accessInfo) .name(name) .typeParameterInfoMap(TypeParameterInfoMap.mapOf(typeParameterInfoList)) .annotationInfoMap(AnnotationInfoMap.mapOf(annotationInfoList)) .enclosingTypeInfo(Optional.fromNullable(enclosingTypeInfo)) .superTypeInfo(Optional.fromNullable(superTypeInfo)) .interfaceInfoMap(InterfaceInfoMap.mapOf(interfaceInfoList)) .constructorInfoMap(ConstructorInfoMap.mapOf(constructorInfoList)) .methodInfoMap(MethodInfoMap.mapOf(methodInfoList)) .declaredTypeInfoMap(TypeInfoMap.mapOf(declaredTypeInfoList)) .build(); }
public TypeInfo build() { return TestingTypeInfo.builder() .kind(kind) .packageInfo(packageInfo) .accessInfo(accessInfo) .name(name) .typeParameterInfoMap(TypeParameterInfoMap.mapOf(typeParameterInfoList)) .annotationInfoList(annotationInfoList) .enclosingSimpleTypeInfoOfNullable(enclosingSimpleTypeInfo) .superTypeInfoOfNullable(superTypeInfo) .interfaceInfoMap(InterfaceInfoMap.mapOf(interfaceInfoList)) .fieldInfoList(fieldInfoList) .constructorInfoList(constructorInfoList) .methodInfoList(methodInfoList) .declaredTypeInfoList(declaredTypeInfoList) .build(); }