Examples of Dynamic


Examples of org.jnetpcap.packet.annotate.Dynamic

   *          the method
   * @return the annotated field method
   */
  public static AnnotatedFieldMethod inspectMethod(Method method) {

    Dynamic runtime = method.getAnnotation(Dynamic.class);

    Field.Property function = runtime.value();
    switch (function) {
      case LENGTH:
      case OFFSET:
        checkSignature(method, int.class);
        return new IntFunction(method, function);
View Full Code Here

Examples of org.jnetpcap.packet.annotate.Dynamic

   */
  public AnnotatedFieldMethod(Method method, Field.Property function) {
    super(method);
    this.function = function;

    Dynamic runtime = method.getAnnotation(Dynamic.class);
    if (runtime == null) {
      throw new HeaderDefinitionError(method.getDeclaringClass(),
          "unable get field's annotated runtime");
    }

    if (runtime.field().length() != 0) {
      this.field = runtime.field();
    } else {
      this.field = guessFieldName(method.getName());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.