com.sun.codemodel
Interface JClassContainer

All Known Implementing Classes:
JDefinedClass, JPackage

public interface JClassContainer

The common aspect of a package and a class.


Method Summary
 JDefinedClass_annotationTypeDeclaration(String name)
          Add an annotationType Declaration to this package
 JDefinedClass_class(int mods, String name)
          Add a new class to this package/class.
 JDefinedClass_class(int mods, String name, boolean isInterface)
          Deprecated. use _class(int, String, ClassType)
 JDefinedClass_class(int mods, String name, ClassType kind)
          Creates a new class/enum/interface/annotation.
 JDefinedClass_class(String name)
          Add a new public class to this class/package.
 JDefinedClass_enum(String name)
          Add a public enum to this package
 JDefinedClass_interface(int mods, String name)
          Add an interface to this class/package.
 JDefinedClass_interface(String name)
          Adds a public interface to this package.
 Iterator<JDefinedClass>classes()
          Returns an iterator that walks the nested classes defined in this class.
 JPackagegetPackage()
          Gets the nearest package parent.
 booleanisClass()
          Returns true if the container is a class.
 booleanisPackage()
          Returns true if the container is a package.
 JCodeModelowner()
          Get the root code model object.
 JClassContainerparentContainer()
          Parent JClassContainer.
 

Method Detail

isClass

boolean isClass()
Returns true if the container is a class.


isPackage

boolean isPackage()
Returns true if the container is a package.


_class

JDefinedClass _class(int mods,                     String name)                     throws JClassAlreadyExistsException
Add a new class to this package/class.

Parameters:
mods - Modifiers for this class declaration
name - Name of class to be added to this package
Returns:
Newly generated class
Throws:
JClassAlreadyExistsException - When the specified class/interface was already created.

_class

JDefinedClass _class(String name)                     throws JClassAlreadyExistsException
Add a new public class to this class/package.

Throws:
JClassAlreadyExistsException - When the specified class/interface was already created.

_interface

JDefinedClass _interface(int mods,                         String name)                         throws JClassAlreadyExistsException
Add an interface to this class/package.

Parameters:
mods - Modifiers for this interface declaration
name - Name of interface to be added to this package
Returns:
Newly generated interface
Throws:
JClassAlreadyExistsException - When the specified class/interface was already created.

_interface

JDefinedClass _interface(String name)                         throws JClassAlreadyExistsException
Adds a public interface to this package.

Throws:
JClassAlreadyExistsException - When the specified class/interface was already created.

_class

JDefinedClass _class(int mods,                     String name,                     boolean isInterface)                     throws JClassAlreadyExistsException
Deprecated. use _class(int, String, ClassType)

Create a new class or a new interface.

Throws:
JClassAlreadyExistsException

_class

JDefinedClass _class(int mods,                     String name,                     ClassType kind)                     throws JClassAlreadyExistsException
Creates a new class/enum/interface/annotation.

Throws:
JClassAlreadyExistsException

classes

Iterator<JDefinedClass> classes()
Returns an iterator that walks the nested classes defined in this class.


parentContainer

JClassContainer parentContainer()
Parent JClassContainer. 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 package to which it belongs. If this is an inner class, this method returns the outer class.


getPackage

JPackage getPackage()
Gets the nearest package parent.

If this.isPackage(), then return this.


owner

JCodeModel owner()
Get the root code model object.


_annotationTypeDeclaration

JDefinedClass _annotationTypeDeclaration(String name)                                         throws JClassAlreadyExistsException
Add an annotationType Declaration to this package

Parameters:
name - Name of the annotation Type declaration to be added to this package
Returns:
newly created Annotation Type Declaration
Throws:
JClassAlreadyExistsException - When the specified class/interface was already created.

_enum

JDefinedClass _enum(String name)                    throws JClassAlreadyExistsException
Add a public enum to this package

Parameters:
name - Name of the enum to be added to this package
Returns:
newly created Enum
Throws:
JClassAlreadyExistsException - When the specified class/interface was already created.


Copyright © 2005-2011
Oracle. All Rights Reserved.


NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14