Package com.hannesdorfmann.fragmentargs.annotation

Examples of com.hannesdorfmann.fragmentargs.annotation.Arg


  public ArgumentAnnotatedField(Element element) {
    super(element, isRequired(element), getKey(element));
  }

  private static String getKey(Element element) {
    Arg annotation = element.getAnnotation(Arg.class);
    String field = element.getSimpleName().toString();
    if (!"".equals(annotation.key())) {
      return annotation.key();
    }
    return getVariableName(field);
  }
View Full Code Here


    }
    return getVariableName(field);
  }

  private static boolean isRequired(Element element) {
    Arg annotation = element.getAnnotation(Arg.class);
    return annotation.required();
  }
View Full Code Here

    if (fields == null) {
      return arguments;
    }
    for (Element element : fields) {
      if (requiredOnly) {
        Arg arg = element.getAnnotation(Arg.class);
        if (!arg.required()) {
          continue;
        }
      }
      arguments.add(new ArgumentAnnotatedField(element));
    }
View Full Code Here

TOP

Related Classes of com.hannesdorfmann.fragmentargs.annotation.Arg

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.