Examples of PackageDeclaration


Examples of org.eclipse.jdt.core.dom.PackageDeclaration

      return new SourceFileInfoPojo(this);
    }

    @Override
    public PackageInfo getPackageInfo() {
      PackageDeclaration pkg = unit.getPackage();
      return PackageDeclarationWrapper.wrapperOf(pkg)
          .toPackageInfo();
    }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.PackageDeclaration

          .transform(toMetaType())
          .toImmutableList();
    }

    private Function<TypeDeclaration, TypeInfo> toMetaType() {
      PackageDeclaration packageDeclaration;
      packageDeclaration = unit.getPackage();

      PackageInfo packageInfo;
      packageInfo = PackageDeclarationWrapper.wrapperOf(packageDeclaration)
          .toPackageInfo();
View Full Code Here

Examples of org.eclipse.jdt.core.dom.PackageDeclaration

         AnnotationTypeDeclaration annotationTypeDeclaration = (AnnotationTypeDeclaration) declaration;
         return new JavaAnnotationImpl(enclosingType, document, unit, annotationTypeDeclaration);
      }
      else if (declaration instanceof PackageDeclaration)
      {
         PackageDeclaration packageDeclaration = (PackageDeclaration) declaration;
         return new JavaPackageInfoImpl(enclosingType, document, unit, packageDeclaration);
      }
      else
      {
         throw new ParserException("Unknown Java source type [" + declaration + "]");
View Full Code Here

Examples of org.eclipse.jdt.core.dom.PackageDeclaration

    * Package modifiers
    */
   @Override
   public String getPackage()
   {
      PackageDeclaration pkg = unit.getPackage();
      if (pkg != null)
      {
         return pkg.getName().getFullyQualifiedName();
      }
      else
      {
         return null;
      }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.PackageDeclaration

    * Package modifiers
    */
   @Override
   public String getPackage()
   {
      PackageDeclaration pkg = unit.getPackage();
      if (pkg != null)
      {
         return pkg.getName().getFullyQualifiedName();
      }
      else
      {
         return null;
      }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.PackageDeclaration

    * Package modifiers
    */
   @Override
   public String getPackage()
   {
      PackageDeclaration pkg = unit.getPackage();
      if (pkg != null)
      {
         return pkg.getName().getFullyQualifiedName();
      }
      else
      {
         return null;
      }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.PackageDeclaration

         AnnotationTypeDeclaration annotationTypeDeclaration = (AnnotationTypeDeclaration) declaration;
         return new JavaAnnotationImpl(enclosingType, document, unit, annotationTypeDeclaration);
      }
      else if (declaration instanceof PackageDeclaration)
      {
         PackageDeclaration packageDeclaration = (PackageDeclaration) declaration;
         return new JavaPackageInfoImpl(enclosingType, document, unit, packageDeclaration);
      }
      else
      {
         throw new ParserException("Unknown Java source type [" + declaration + "]");
View Full Code Here

Examples of org.eclipse.jdt.core.dom.PackageDeclaration

  public static String buildFullyQualifiedName(TypeDeclaration element) {
    String fullName = null;
    if (element != null) {
      ASTNode parent = element.getParent();
      if(parent instanceof PackageDeclaration) {
        PackageDeclaration pack = (PackageDeclaration)parent;
        fullName = PackageService.buildFullyQualifiedName(pack) + '.';
      }
      else if(parent instanceof TypeDeclaration) {
        fullName = buildFullyQualifiedName((TypeDeclaration)parent);
        fullName += '$';
View Full Code Here

Examples of org.eclipse.jdt.core.dom.PackageDeclaration

     */
    @SuppressWarnings( "unchecked" )
    protected PackageMetadata createPackageMetadata( CompilationUnit unit ) {
        PackageMetadata packageMetadata = null;
        List<Annotation> annotations = null;
        PackageDeclaration packageDeclaration = unit.getPackage();
        if (packageDeclaration != null) {
            annotations = packageDeclaration.annotations();
            packageMetadata = new PackageMetadata();
            packageMetadata.setName(JavaMetadataUtil.getName(unit.getPackage().getName()));
            if (!annotations.isEmpty()) {
                for (Object object : annotations) {

View Full Code Here

Examples of org.eclipse.jdt.core.dom.PackageDeclaration

     */
    @SuppressWarnings( "unchecked" )
    protected PackageMetadata createPackageMetadata( CompilationUnit unit ) {
        PackageMetadata packageMetadata = null;
        List<Annotation> annotations = null;
        PackageDeclaration packageDeclaration = unit.getPackage();
        if (packageDeclaration != null) {
            annotations = packageDeclaration.annotations();
            packageMetadata = new PackageMetadata();
            packageMetadata.setName(JavaMetadataUtil.getName(unit.getPackage().getName()));
            if (!annotations.isEmpty()) {
                for (Object object : annotations) {

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.