PackageSpecifier:
Identifier / PackageSpecifier*
@param sb
@param type
432972
private static void packageSpecifier(Result sb, TypeMirror type) throws IOException
    {
        switch (type.getKind())
        {
            case DECLARED:
                DeclaredType dt = (DeclaredType) type;
                PackageElement pkg = El.getPackageOf(dt.asElement());
                sb.append(pkg.getQualifiedName().toString().replace('.', '/'));
                sb.append('/');
                break;
            default:
                throw new UnsupportedOperationException(type.getKind()+" unsupported");
        }
    }
657823
private void definePackageIfNecessary(String className) {
		int lastDot = className.lastIndexOf('.');
		if (lastDot >= 0) {
			String packageName = className.substring(0, lastDot);
			if (getPackage(packageName) == null) {
				try {
					definePackage(className, packageName);
				}
				catch (IllegalArgumentException ex) {
					// Tolerate race condition due to being parallel capable
					if (getPackage(packageName) == null) {
						// This should never happen as the IllegalArgumentException
						// indicates that the package has already been defined and,
						// therefore, getPackage(name) should not have returned null.
						throw new AssertionError(
								"Package " + packageName + " has already been defined "
										+ "but it could not be found");
					}
				}
			}
		}
	}
66082
public int setContentType(final int type) {
		this.type = type;
		// If the new type has Application, but there is no application fw, remove this type bit
		if ((type & DfuBaseService.TYPE_APPLICATION) > 0 && applicationBytes == null)
			this.type &= ~DfuBaseService.TYPE_APPLICATION;
		// If the new type has SD+BL
		if ((type & (DfuBaseService.TYPE_SOFT_DEVICE | DfuBaseService.TYPE_BOOTLOADER)) == (DfuBaseService.TYPE_SOFT_DEVICE | DfuBaseService.TYPE_BOOTLOADER)) {
			// but there is no SD, remove the softdevice type bit
			if (softDeviceBytes == null && softDeviceAndBootloaderBytes == null)
				this.type &= ~DfuBaseService.TYPE_SOFT_DEVICE;
			// or there is no BL, remove the bootloader type bit
			if (bootloaderBytes == null && softDeviceAndBootloaderBytes == null)
				this.type &= ~DfuBaseService.TYPE_SOFT_DEVICE;
		} else {
			// If at least one of SD or B: bit is cleared, but the SD+BL file is set, remove both bits.
			if (softDeviceAndBootloaderBytes != null)
				this.type &= ~(DfuBaseService.TYPE_SOFT_DEVICE | DfuBaseService.TYPE_BOOTLOADER);
		}

		if ((type & (DfuBaseService.TYPE_SOFT_DEVICE | DfuBaseService.TYPE_BOOTLOADER)) > 0 && softDeviceAndBootloaderBytes != null)
			currentSource = softDeviceAndBootloaderBytes;
		else if ((type & DfuBaseService.TYPE_SOFT_DEVICE) > 0)
			currentSource = softDeviceBytes;
		else if ((type & DfuBaseService.TYPE_BOOTLOADER) > 0)
			currentSource = bootloaderBytes;
		else if ((type & DfuBaseService.TYPE_APPLICATION) > 0)
			currentSource = applicationBytes;
		bytesReadFromCurrentSource = 0;
		mark(0);
		reset();
		return this.type;
	}
1005465
public Packet setPacketType(Packet.Type type) {
        int nonTypeFlags = flags & (~FLAG_TYPE0 & ~FLAG_TYPE1 & ~FLAG_TYPE2);
        resetFlagsTo(type.headerEncoding | nonTypeFlags);
        return this;
    }
210719
public static boolean isObjClass(Class<?> type) {
        if (type.isPrimitive() || type.isEnum() || type.isArray()) {
            return false;
        }

        String block = BASIC_PACKAGE_PREFIX_LIST.stream().filter(prefix -> type.getName().startsWith(prefix)).findAny().orElse(null);
        if (block != null) {
            return false;
        }

        return !PRIMITIVE_CLASS_LIST.contains(type);
    }
974978
public List<TypedDependency> typedDependencies(boolean includeExtras) {
    List<TypedDependency> deps = includeExtras ? allTypedDependencies
                                                       : typedDependencies;
    correctDependencies(deps);
    return deps;
  }
681589
private void appendTypeDescriptor(StringBuilder sb, Class clazz)
    {
        if (clazz.isPrimitive())
            sb.append(_primToType.get(clazz));
        else if (clazz.isArray())
            sb.append(clazz.getName().replace('.','/'));
        else
        {
            sb.append("L");
            sb.append(clazz.getName().replace('.','/'));
            sb.append(";");
        }
    }
1048691
public boolean validatePackageNameType(String packageNameType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}
802505
void makePackageDoc(PackageSymbol pack, TreePath treePath) {
        PackageDocImpl result = packageMap.get(pack);
        if (result != null) {
            if (treePath != null) result.setTreePath(treePath);
        } else {
            result = new PackageDocImpl(this, pack, treePath);
            packageMap.put(pack, result);
        }
    }
128874
private void addType(Type t) {
        String signature = t.getSignature();
        if (signature.startsWith(Values.SIG_QUALIFIED_CLASS_PREFIX)) {
            refClasses.add(SignatureUtils.trimSignature(signature));
        }
    }
1283058
private void addTypeElement(TypeElement typeElement, Map<PackageElement, SortedSet<TypeElement>> map) {

        PackageElement pkg = utils.containingPackage(typeElement);
        if (utils.isSpecified(pkg) || configuration.nodeprecated && utils.isDeprecated(pkg)) {
            // No need to catalog this class if it's package is
            // specified on the command line or if -nodeprecated option is set
            return;
        }

        SortedSet<TypeElement> s = map.get(pkg);
        if (s == null) {
            packageSet.add(pkg);
            s = new TreeSet<>(comparator);
        }
        s.add(typeElement);
        map.put(pkg, s);

    }
38596
private void genClassSignature(TypeElement type, StringBuilder sb) {
    genOptFormalTypeParameters(type.getTypeParameters(), sb);
    // JDT returns null for an interface's superclass, but signatures expect Object.
    if (type.getKind().isInterface()) {
      sb.append(JAVA_OBJECT_SIGNATURE);
    } else {
      genTypeSignature(type.getSuperclass(), sb);
    }
    for (TypeMirror intrface : type.getInterfaces()) {
      genTypeSignature(intrface, sb);
    }
  }
1151418
def encode_type(primary_type, types):
    
    # Getting the dependencies and sorting them alphabetically as per EIP712
    deps = get_dependencies(primary_type, types)
    sorted_deps = (primary_type,) + tuple(sorted(deps))

    result = ''.join(
        [
            encode_struct(struct_name, types[struct_name])
            for struct_name in sorted_deps
        ]
    )
    return result
708154
private static void buildUpperBoundClassAndInterfaces(Type type, Set<Class<?>> result) {
		if (type instanceof ParameterizedType || type instanceof Class<?>) {
			result.add(erase(type));
			return;
		}

		for (Type superType: getExactDirectSuperTypes(type)) {
			buildUpperBoundClassAndInterfaces(superType, result);
		}
	}
1190462
private static void getWildcardTypePackageNames(WildcardType type,
      Map<String, Class<?>> packageNames) {
    for (Type boundType : type.getUpperBounds()) {
      getTypePackageNames(boundType, packageNames);
    }

    for (Type boundType : type.getLowerBounds()) {
      getTypePackageNames(boundType, packageNames);
    }
  }
213037
@Override
    public void accept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction) {
        if (this.options.verbose) {
            this.out.println(
                Messages.bind(Messages.compilation_loadBinary, new String(binaryType.getName())));
//			new Exception("TRACE BINARY").printStackTrace(System.out);
//		    System.out.println();
        }
        LookupEnvironment env = packageBinding.environment;
        env.createBinaryTypeFrom(binaryType, packageBinding, accessRestriction);
    }
162694
private static void fieldTypeSignature(Result sb, TypeMirror type) throws IOException
    {
        switch (type.getKind())
        {
            case DECLARED:
                classTypeSignature(sb, type);
                break;
            case TYPEVAR:
                typeVariableSignature(sb, (TypeVariable)type);
                break;
            case ARRAY:
                arrayTypeSignature(sb, (ArrayType)type);
                break;
            default:
                //throw new UnsupportedOperationException(type.getKind()+" unsupported");
        }
    }