public class DefaultJavaPackage extends AbstractBaseJavaEntity implements JavaPackage
JavaPackage, representing a Package.| Constructor and Description |
|---|
DefaultJavaPackage(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addClass(JavaClass clazz) |
boolean |
equals(java.lang.Object o) |
JavaClass |
getClassByName(java.lang.String name)
Try to get any class of this package by name.
|
java.util.Collection<JavaClass> |
getClasses()
Returns all the classes found for the package.
|
java.lang.String |
getCodeBlock() |
ClassLibrary |
getJavaClassLibrary()
The
ClassLibrary of this package. |
java.lang.String |
getName()
Equivalent of
Package.getName() |
JavaPackage |
getParentPackage()
The parent of this package
For instance: the package of
java.lang.reflect is java.lang |
java.util.List<JavaPackage> |
getSubPackages()
For instance: one of the children of
java.lang would be java.lang.reflect |
int |
hashCode() |
void |
setClassLibrary(ClassLibrary classLibrary) |
void |
setName(java.lang.String name) |
java.lang.String |
toString()
Equivalent of
Package.toString() |
getAnnotations, getComment, getDeclaringClass, getNamedParameter, getSource, getTagByName, getTags, getTagsByName, setAnnotations, setComment, setSource, setTagsgetLineNumber, getModelWriter, setLineNumber, setModelWriterFactoryclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAnnotations, getComment, getNamedParameter, getTagByName, getTags, getTagsByNamegetLineNumberpublic DefaultJavaPackage(java.lang.String name)
name - the name of the package, should never be nullpublic java.lang.String getName()
Package.getName()getName in interface JavaPackagenullpublic void setName(java.lang.String name)
public java.lang.String getCodeBlock()
getCodeBlock in interface JavaModelpublic void setClassLibrary(ClassLibrary classLibrary)
public ClassLibrary getJavaClassLibrary()
ClassLibrary of this package.getJavaClassLibrary in interface JavaPackagenullpublic void addClass(JavaClass clazz)
public java.util.Collection<JavaClass> getClasses()
getClasses in interface JavaPackagenullpublic JavaClass getClassByName(java.lang.String name)
getClassByName in interface JavaPackagename - the (fully qualified) name of the classnullpublic JavaPackage getParentPackage()
java.lang.reflect is java.langgetParentPackage in interface JavaPackagenullpublic java.util.List<JavaPackage> getSubPackages()
java.lang would be java.lang.reflectgetSubPackages in interface JavaPackagenullpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
JavaPackagePackage.toString()toString in interface JavaPackagetoString in class java.lang.ObjectCopyright © 2002-2018. All Rights Reserved.