Package com.bacoder.parser.java.api

Examples of com.bacoder.parser.java.api.PackageDeclaration


    super(adapters);
  }

  @Override
  public PackageDeclaration adapt(PackageDeclarationContext context) {
    PackageDeclaration packageDeclaration = createNode(context);

    List<Annotation> annotations =
        transform(context, AnnotationContext.class, new Function<AnnotationContext, Annotation>() {
          @Override
          public Annotation apply(AnnotationContext context) {
            return getAdapter(AnnotationAdapter.class).adapt(context);
          }
        });
    packageDeclaration.setAnnotations(annotations);

    QualifiedNameContext qualifiedNameContext = getChild(context, QualifiedNameContext.class);
    if (qualifiedNameContext != null) {
      packageDeclaration.setQualifiedName(
          getAdapter(QualifiedNameAdapter.class).adapt(qualifiedNameContext));
    }

    return packageDeclaration;
  }
View Full Code Here

TOP

Related Classes of com.bacoder.parser.java.api.PackageDeclaration

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.