Sets this Pojo's name

@param pojoPackage
The Package used to create POJO
@param className
Class to be created
@return This instance
557870
public PojoBuilder withName(String pojoPackage, String className) {
		if (!NamingHelper.isValidJavaClassName(className)) {
			className = NamingHelper.cleanNameForJava(className);
		}

		final String fullyQualifiedClassName = pojoPackage + "." + className;
		// Initiate package if necessary
		if (this.pojoPackage == null) {
			withPackage(pojoPackage);
		}

		// Builders should only have 1 active pojo under their responsibility
		if (this.pojo != null) {
			throw new IllegalStateException("Class already created");
		}

		try {
			// create the class
			logger.debug("Creating class {}", fullyQualifiedClassName);
			this.pojo = this.pojoModel._class(fullyQualifiedClassName);

			// Always add default constructor
			withDefaultConstructor(className);

			// Handle Serialization
			implementsSerializable();

			implementsGeneratedAnnotation();

			// Add to shortcuts
			this.codeModels.put(fullyQualifiedClassName, this.pojo);
		} catch (JClassAlreadyExistsException e) {
			// class already exists - reuse it!
			logger.debug("Enum {} already exists. Reusing it!", fullyQualifiedClassName);
			this.pojo = this.pojoModel._getClass(fullyQualifiedClassName);
		}
		return this;
	}
624496
private static String getPackageName(Class<?> clazz) {

        LettuceAssert.notNull(clazz, "Class must not be null");
        return getPackageName(clazz.getName());
    }
924850
public synchronized Set<Class<?>> scanPackage(String basePackage, ClassSelector selector) throws Exception {
        if (selector == null) {
            throw new NullPointerException("Selector cannot be null");
        }
        this.selector = selector;
        this.classes = new HashSet<Class<?>>();
        Set<Class<?>> aux;
        try {
            scanClasses0(basePackage);
            aux = this.classes;
        }
        finally {
            this.selector = null;
            this.classes = null;
        }

        return aux;
    }
917191
public static Set<Class<?>> scanPackageByAnnotation(String packageName, final Class<? extends Annotation> annotationClass) {
		return ClassScaner.scanPackageByAnnotation(packageName, annotationClass);
	}
207177
@Override
    public T addPackage(String pack) throws IllegalArgumentException {
        Validate.notNull(pack, "Package must be specified");

        return addPackages(false, pack);
    }
635635
public static String readClassName (File source)
        throws IOException
    {
        // load up the file and determine it's package and classname
        String pkgname = null, name = null;
        BufferedReader bin = new BufferedReader(new FileReader(source));
        String line;
        while ((line = bin.readLine()) != null) {
            Matcher pm = PACKAGE_PATTERN.matcher(line);
            if (pm.find()) {
                pkgname = pm.group(1);
            }
            Matcher nm = NAME_PATTERN.matcher(line);
            if (nm.find()) {
                name = nm.group(2);
                break;
            }
        }
        bin.close();

        // make sure we found something
        if (name == null) {
            throw new IOException("Unable to locate class or interface name in " + source + ".");
        }

        // prepend the package name to get a name we can Class.forName()
        if (pkgname != null) {
            name = pkgname + "." + name;
        }

        return name;
    }
878380
public Content getPackageName(PackageElement packageElement) {
        return packageElement == null || packageElement.isUnnamed()
                ? contents.defaultPackageLabel
                : getPackageLabel(packageElement.getQualifiedName());
    }
611954
public static void infoOnGeneratedClasses(Class<? extends Annotation> annotation, String packageName, String className) {
		String msg = String.format("class '%s' in package '%s' is generated by '@%s' annotation processor", className, packageName, annotation.getSimpleName());
		
		printMessage(msg);
	}
1302631
@PublicAPI(usage = ACCESS)
    public JavaClasses importPackages(String... packages) {
        return importPackages(ImmutableSet.copyOf(packages));
    }
760538
public static String packageNameOf(Class<?> clazz) {
        String name = clazz.getName();
        int pos = name.lastIndexOf('.');
        E.unexpectedIf(pos < 0, "Class does not have package: " + name);
        return name.substring(0, pos);
    }
975875
public String java(GeneratedPackage generatedPackage, String javaClassName) {
        generatedPackageRestriction(generatedPackage);
        return java(generatedPackage.getPackageName(), javaClassName);
    }
227566
public void addClassReference(final String className, final MetadataElement classReference) {
        classReference.setRef(getNamespaceValue(classReference.getRef()));
        for (MetadataItem item : classList) {
            if (item.getName().equals(className) && item.getNamespace().equals(getCurrentNamespace())
                && item.getPackageApi().equals(getCurrentPackageApi())) {
                item.getReferences().add(classReference);
                return;
            }
        }

        final MetadataItem newItem = new MetadataItem(className);
        newItem.getReferences().add(classReference);
        newItem.setNamespace(getCurrentNamespace());
        newItem.setSchemaName(getCurrentSchmema());
        newItem.setPackageApi(getCurrentPackageApi());
        newItem.setPackageImpl(getCurrentPackageImpl());
        classList.add(newItem);
    }
1197338
@Nullable
  public JAXBContext getFromCache (@Nonnull final Package aPackage)
  {
    return getFromCache (aPackage, (ClassLoader) null);
  }
220781
public static Set<Class<?>> scanPackageBySuper(String packageName, final Class<?> superClass) {
		return ClassScaner.scanPackageBySuper(packageName, superClass);
	}
697463
public ClassLoader getBundleClassLoader(String packageName, String version) throws ClassNotFoundException
    {
        if ((packageName == null) || (packageName.length() == 0))
            return null;

        ClassLoader classLoader  = null;
        if (this.getClassFinder(null) != null)
        	classLoader = this.getClassFinder(null).findBundleClassLoader(packageName, version);	// Try to find this class in the obr repos

        return classLoader;
    }
680135
public static String extractPackage(String classname) {
    if (classname.contains("."))
      return classname.substring(0, classname.lastIndexOf("."));
    else
      return DEFAULT_PACKAGE;
  }
1089121
public static PackageNameMappingWithPackagePattern fromPackage(String packagePattern)
    {
        PackageNameMapping packageNameMapping = new PackageNameMapping();
        packageNameMapping.setPackagePattern(packagePattern);
        return packageNameMapping;
    }