コード例 #1
0
  private IParameterModel processParameterReference(CtTypeReference<?> paramTypeReference) {

    ParameterModel parameterModel = new ParameterModel();
    parameterModel.setType(paramTypeReference.getQualifiedName());
    parameterModel.setName(paramTypeReference.getSimpleName());
    parameterModel.setRequired(paramTypeReference.isPrimitive());

    List<Annotation> annotations = paramTypeReference.getAnnotations();
    for (Annotation a : annotations) {
      IAnnotationModel annotationModel = processJavaLangAnnotation(a);
      parameterModel.addAnnotation(annotationModel);
    }

    return parameterModel;
  }
コード例 #2
0
  private IParameterModel processParameter(CtParameter<?> paramElement) {

    ParameterModel parameterModel = new ParameterModel();

    CtTypeReference<?> paramType = paramElement.getType();
    String qualifiedName = paramType.getQualifiedName();
    parameterModel.setType(qualifiedName);
    parameterModel.setRequired(paramType.isPrimitive());

    fillBasic(parameterModel, paramElement);
    fillJAXBType(parameterModel, paramType);
    processTypeReference(paramType);

    return parameterModel;
  }