private boolean isReified(TypeVariableInfo typeVar, MethodInfo method) { if (typeVar.isClassParam()) { return true; } else { TypeArgExpression typeArg = method.resolveTypeArg(typeVar); return typeArg != null && typeArg.isClassType(); } }
private boolean isReified(TypeVariableInfo typeVar, MethodInfo method) { if (typeVar.isClassParam()) { return true; } else { TypeArgExpression typeArg = method.resolveTypeArg(typeVar); return typeArg != null && typeArg.isClassType(); } }
/** * Resolve the method parameter that is of kind {@link ClassKind#CLASS_TYPE} and that matches the specified type variable e.g:<br/> * <br/> * {@code <U> Map.Entry<String, U> getEntry(String s, Class<U> type);} * <br/> * <br/> * returns for {@code <U>} the second method parameter. * * @param typeVar the type variable to check * @return the matching method parameter or null */ public ParamInfo resolveClassTypeParam(TypeVariableInfo typeVar) { TypeArgExpression res = resolveTypeArg(typeVar); if (res != null && res.isClassType()) { return res.getParam(); } return null; }
private String genTypeArg(TypeVariableInfo typeVar, MethodInfo method) { if (typeVar.isClassParam()) { return "__typeArg_" + typeVar.getParam().getIndex(); } else { TypeArgExpression typeArg = method.resolveTypeArg(typeVar); if (typeArg != null) { if (typeArg.isClassType()) { return "io.vertx.lang.rx.TypeArg.of(" + typeArg.getParam().getName() + ")"; } else { return typeArg.getParam().getName() + ".__typeArg_" + typeArg.getIndex(); } } } return null; }
private String genTypeArg(TypeVariableInfo typeVar, MethodInfo method) { if (typeVar.isClassParam()) { return "__typeArg_" + typeVar.getParam().getIndex(); } else { TypeArgExpression typeArg = method.resolveTypeArg(typeVar); if (typeArg != null) { if (typeArg.isClassType()) { return "io.vertx.lang.rx.TypeArg.of(" + typeArg.getParam().getName() + ")"; } else { return typeArg.getParam().getName() + ".__typeArg_" + typeArg.getIndex(); } } } return null; }