private static ConstructorDef<?> parseConstructorDef( org.apache.reef.tang.proto.ClassHierarchyProto.ConstructorDef def, boolean isInjectable) { List<ConstructorArg> args = new ArrayList<>(); for (ClassHierarchyProto.ConstructorArg arg : def.getArgsList()) { args.add( new ConstructorArgImpl( arg.getFullArgClassName(), arg.getNamedParameterName(), arg.getIsInjectionFuture())); } return new ConstructorDefImpl<>( def.getFullClassName(), args.toArray(new ConstructorArg[0]), isInjectable); }
private static ClassHierarchyProto.ConstructorDef newConstructorDef( String fullClassName, List<ClassHierarchyProto.ConstructorArg> args) { return ClassHierarchyProto.ConstructorDef.newBuilder() .setFullClassName(fullClassName) .addAllArgs(args) .build(); }