Get the enclosed name of the package

@param te  TypeElement
@return the name
346548
public String getEnclosingPackageName(TypeElement te) {

        PackageElement encl = configuration.utils.containingPackage(te);
        return (encl.isUnnamed()) ? "" : (encl.getQualifiedName() + ".");
    }
441331
public static DocPath forName(Utils utils, TypeElement typeElement) {
        return (typeElement == null) ? empty : new DocPath(utils.getSimpleName(typeElement) + ".html");
    }
372904
String getPackage() {
        if (this.packageName != null)
            return this.packageName;
        if (this.parent != null)
            return this.parent.getPackage();
        return null;
    }
807729
public String getTypeName() {
		String type = null;
		if (dataType != null) {
			type = dataType.name();
		}
		return type;
	}
1191277
public static ClassName get(TypeElement element) {
    checkNotNull(element, "element == null");
    String simpleName = element.getSimpleName().toString();

    return element.getEnclosingElement().accept(new SimpleElementVisitor8<ClassName, Void>() {
      @Override public ClassName visitPackage(PackageElement packageElement, Void p) {
        return new ClassName(packageElement.getQualifiedName().toString(), null, simpleName);
      }

      @Override public ClassName visitType(TypeElement enclosingClass, Void p) {
        return ClassName.get(enclosingClass).nestedClass(simpleName);
      }

      @Override public ClassName visitUnknown(Element unknown, Void p) {
        return get("", simpleName);
      }

      @Override public ClassName defaultAction(Element enclosingElement, Void p) {
        throw new IllegalArgumentException("Unexpected type nesting: " + element);
      }
    }, null);
  }
1268315
public String getTypeNameForProfile(ClassDoc cd) {
        StringBuilder typeName =
                new StringBuilder((cd.containingPackage()).name().replace(".", "/"));
        typeName.append("/")
                .append(cd.name().replace(".", "$"));
        return typeName.toString();
    }
767686
public String getQualifiedName() {
		if (StringUtils.hasText(packageName)) {
			return packageName + "." + typeSpec.name;
		}

		return typeSpec.name;
	}
552338
String getName(TypeName typeName) {
    String name = typeToNames.get(typeName);
    if (name != null) {
      return name;
    }
    name = getNameInternal(typeName);
    name = CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, name);
    name = adapterNames.getUniqueName(name);
    typeToNames.put(typeName, name);
    return name;
  }
1225877
private String extractName(GroovySourceAST typeNode) {
        String typeName = buildName(typeNode);
        if (!typeName.contains("/")) {
            String slashName = "/" + typeName;
            // Groovy currently resolves this to last found so traverse in reverse order
            for (int i = importedClassesAndPackages.size() - 1; i >= 0; i--) {
                String name = importedClassesAndPackages.get(i);
                if (!aliases.containsValue(name) && name.endsWith(slashName)) {
                    typeName = name;
                    break;
                }
            }
        }
        return typeName;
    }
1092865
public String getPrefix(PackageElement packageElement) {
    if (packageElement == null) {
      return "";
    }
    String packageName = packageElement.getQualifiedName().toString();
    String prefix = getPrefix(packageName);
    if (prefix != null) {
      return prefix;
    }

    prefix = packageLookup.getObjectiveCName(packageName);
    if (prefix == null) {
      prefix = NameTable.camelCaseQualifiedName(packageName);
    }
    addPrefix(packageName, prefix);
    return prefix;
  }
365908
public static String getPackageName(Elements elementUtils, Types typeUtils, TypeMirror type) {
		TypeVisitor<DeclaredType, Object> tv = new SimpleTypeVisitor6<DeclaredType, Object>() {

			@Override
			public DeclaredType visitDeclared(DeclaredType t, Object p) {
				return t;
			}
		};
		DeclaredType dt = type.accept(tv, null);
		if (dt != null) {
			ElementVisitor<TypeElement, Object> ev =
					new SimpleElementVisitor6<TypeElement, Object>() {

						@Override
						public TypeElement visitType(TypeElement e, Object p) {
							return e;
						}
					};
			TypeElement el = typeUtils.asElement(dt).accept(ev, null);
			if (el != null && el.getNestingKind() != NestingKind.TOP_LEVEL) {
				return AptUtil.getPackageName(elementUtils, el);
			}
		}
		return AptUtil.getPackageNameSub(type);
	}
548581
public String typeName() {
        return (type instanceof ClassDoc || type instanceof TypeVariable)
                ? type.typeName()       // omit formal type params or bounds
                : type.toString();
    }
1145005
String getFilename(TypeElement te, String fwk) {
		return getFilename(te.getSimpleName().toString(), fwk);
	}
256769
public String parsePackageName(PackageElement p) {
        String pkgname = p.isUnnamed() ? "" : getPackageName(p);
        int index = -1;
        for (int j = 0; j < MAX_CONSTANT_VALUE_INDEX_LENGTH; j++) {
            index = pkgname.indexOf(".", index + 1);
        }
        if (index != -1) {
            pkgname = pkgname.substring(0, index);
        }
        return pkgname;
    }
587256
public static String getPackageName(String className, boolean resource)
   {
       String packageName = null;
       if (className != null)
       {
       	if (resource)
       		if (className.endsWith(PROPERTIES))
       			className = className.substring(0, className.length() - PROPERTIES.length());
           if (className.lastIndexOf('.') != -1)
               packageName = className.substring(0, className.lastIndexOf('.'));
       }
       return packageName;
   }
624105
public static String getPackageName(Elements elementUtils, Element element) {
		return elementUtils.getPackageOf(element).getQualifiedName().toString();
	}
1274543
public static String extractPackageFromStackTraceElement(StackTraceElement element) {
        String className = element.getClassName();
        int lastDotIndex = className.lastIndexOf(".");
        String packageName;
        if (lastDotIndex > 0) {
            packageName = className.substring(0, lastDotIndex);
        } else {
            packageName = className;
        }
        return packageName;
    }