Package org.eclipse.jdt.core.dom

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


    List<CompilationUnit> result = new ArrayList<CompilationUnit>();

    for (String c : getClasses()) {

      PackageDeclaration packageDeclaration = getPackage(c);

      // List<ImportDeclaration> importDeclarations = getImports(c);

      TypeDeclaration typeDeclaration = getClass(c);
View Full Code Here

    return result;
  }

  private PackageDeclaration getPackage(String classId) {
    PackageDeclaration result = ast.newPackageDeclaration();

    Sig classSig = getSig("Class");
    SafeList<Field> cFields = classSig.getFields();
    Field packageRelations = getField("package", cFields);
    Map<String, List<String>> r = getRelations(packageRelations);

    String packageName = r.get(classId).get(0);

    result.setName(ast.newSimpleName(packageName));

    return result;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.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.