CLASSTYPE
- Implementation typepublic interface IJClassContainer<CLASSTYPE extends IJClassContainer<CLASSTYPE>> extends IJOwned
Modifier and Type | Method and Description |
---|---|
default CLASSTYPE |
_annotationTypeDeclaration(int nMods,
String sName)
Add an annotationType Declaration to this package
|
default CLASSTYPE |
_annotationTypeDeclaration(String sName)
Add an annotationType Declaration to this package
|
default CLASSTYPE |
_class(int nMods,
String sName)
Add a new class to this package/class.
|
CLASSTYPE |
_class(int nMods,
String sName,
EClassType eClassType)
Creates a new class/enum/interface/annotation.
|
default CLASSTYPE |
_class(String sName)
Add a new public class to this class/package.
|
default CLASSTYPE |
_enum(int nMods,
String sName)
Add a enum to this package
|
default CLASSTYPE |
_enum(String sName)
Add a public enum to this package
|
default CLASSTYPE |
_interface(int nMods,
String sName)
Add an interface to this class/package.
|
default CLASSTYPE |
_interface(String sName)
Adds a public interface to this package.
|
Collection<CLASSTYPE> |
classes() |
JPackage |
getPackage() |
boolean |
isClass() |
boolean |
isPackage() |
IJClassContainer<?> |
parentContainer() |
boolean isClass()
true
if the container is a class, false
if it is a packageisPackage()
boolean isPackage()
true
if the container is a package, false
if it is a class.isClass()
IJClassContainer<?> parentContainer()
IJClassContainer
. If this is a package, this method
returns a parent package, or null
if this package is
the root package. If this is an outer-most class, this method
returns a JPackage
to which it belongs. If this is an inner
class, this method returns the outer class.JPackage getPackage()
@Nonnull CLASSTYPE _class(int nMods, @Nonnull String sName, @Nonnull EClassType eClassType) throws JClassAlreadyExistsException
nMods
- Modifiers for this ...sName
- Name of ... to be added to this package.eClassType
- The type of class to create. May not be null
.JClassAlreadyExistsException
- If another class/interface/... with the same name already exists@Nonnull default CLASSTYPE _class(@Nonnull String sName) throws JClassAlreadyExistsException
sName
- Name of class to be added to this packageJClassAlreadyExistsException
- If another class/interface/... with the same name already exists@Nonnull default CLASSTYPE _class(int nMods, @Nonnull String sName) throws JClassAlreadyExistsException
nMods
- Modifiers for this class declarationsName
- Name of class to be added to this packageJClassAlreadyExistsException
- If another class/interface/... with the same name already exists@Nonnull default CLASSTYPE _interface(@Nonnull String sName) throws JClassAlreadyExistsException
sName
- Name of interface to be added to this packageJClassAlreadyExistsException
- If another class/interface/... with the same name already exists@Nonnull default CLASSTYPE _interface(int nMods, @Nonnull String sName) throws JClassAlreadyExistsException
nMods
- Modifiers for this interface declarationsName
- Name of interface to be added to this packageJClassAlreadyExistsException
- If another class/interface/... with the same name already exists@Nonnull default CLASSTYPE _annotationTypeDeclaration(@Nonnull String sName) throws JClassAlreadyExistsException
sName
- Name of the annotation Type declaration to be added to this packageJClassAlreadyExistsException
- If another class/interface/... with the same name already exists@Nonnull default CLASSTYPE _annotationTypeDeclaration(int nMods, @Nonnull String sName) throws JClassAlreadyExistsException
nMods
- Modifiers for this annotation Type declarationsName
- Name of the annotation Type declaration to be added to this packageJClassAlreadyExistsException
- If another class/interface/... with the same name already exists@Nonnull default CLASSTYPE _enum(@Nonnull String sName) throws JClassAlreadyExistsException
sName
- Name of the enum to be added to this packageJClassAlreadyExistsException
- If another class/interface/... with the same name already exists@Nonnull default CLASSTYPE _enum(int nMods, @Nonnull String sName) throws JClassAlreadyExistsException
nMods
- Modifiers for this enum declarationsName
- Name of the enum to be added to this packageJClassAlreadyExistsException
- If another class/interface/... with the same name already exists@Nonnull Collection<CLASSTYPE> classes()
null
.Copyright © 2013–2018 Philip Helger. All rights reserved.