Tabnine Logo
JDefinedClass._class
Code IndexAdd Tabnine to your IDE (free)

How to use
_class
method
in
com.sun.codemodel.JDefinedClass

Best Java code snippets using com.sun.codemodel.JDefinedClass._class (Showing top 20 results out of 315)

origin: com.sun.codemodel/codemodel

/**
 * Add a new public nested class to this class.
 */
public JDefinedClass _class(String name)
  throws JClassAlreadyExistsException {
  return _class(JMod.PUBLIC, name);
}
origin: com.sun.codemodel/codemodel

/**
 * Add an annotationType Declaration to this package
 * @param name
 *      Name of the annotation Type declaration to be added to this package
 * @return
 *      newly created Annotation Type Declaration
 * @exception JClassAlreadyExistsException
 *      When the specified class/interface was already created.
 
 */
public JDefinedClass _annotationTypeDeclaration(String name) throws JClassAlreadyExistsException {
  return _class (JMod.PUBLIC,name,ClassType.ANNOTATION_TYPE_DECL);
}
origin: com.sun.codemodel/codemodel

/**
 * Add a public enum to this package
 * @param name
 *      Name of the enum to be added to this package
 * @return
 *      newly created Enum
 * @exception JClassAlreadyExistsException
 *      When the specified class/interface was already created.
 
 */
public JDefinedClass _enum (String name) throws JClassAlreadyExistsException {
  return _class (JMod.PUBLIC,name,ClassType.ENUM);
}

origin: org.glassfish.metro/webservices-tools

/**
 * Add a new public nested class to this class.
 */
public JDefinedClass _class(String name)
  throws JClassAlreadyExistsException {
  return _class(JMod.PUBLIC, name);
}
origin: sun-jaxb/jaxb-xjc

/**
 * Add an annotationType Declaration to this package
 * @param name
 *      Name of the annotation Type declaration to be added to this package
 * @return
 *      newly created Annotation Type Declaration
 * @exception JClassAlreadyExistsException
 *      When the specified class/interface was already created.
 
 */
public JDefinedClass _annotationTypeDeclaration(String name) throws JClassAlreadyExistsException {
  return _class (JMod.PUBLIC,name,ClassType.ANNOTATION_TYPE_DECL);
}
origin: sun-jaxb/jaxb-xjc

/**
 * Add a public enum to this package
 * @param name
 *      Name of the enum to be added to this package
 * @return
 *      newly created Enum
 * @exception JClassAlreadyExistsException
 *      When the specified class/interface was already created.
 
 */
public JDefinedClass _enum (String name) throws JClassAlreadyExistsException {
  return _class (JMod.PUBLIC,name,ClassType.ENUM);
}

origin: org.glassfish.metro/webservices-tools

/**
 * Add an annotationType Declaration to this package
 * @param name
 *      Name of the annotation Type declaration to be added to this package
 * @return
 *      newly created Annotation Type Declaration
 * @exception JClassAlreadyExistsException
 *      When the specified class/interface was already created.
 
 */
public JDefinedClass _annotationTypeDeclaration(String name) throws JClassAlreadyExistsException {
  return _class (JMod.PUBLIC,name,ClassType.ANNOTATION_TYPE_DECL);
}
origin: com.unquietcode.tools.jcodemodel/codemodel

/**
 * Add a public enum to this package
 * @param name
 *      Name of the enum to be added to this package
 * @return
 *      newly created Enum
 * @exception JClassAlreadyExistsException
 *      When the specified class/interface was already created.
 
 */
public JDefinedClass _enum (String name) throws JClassAlreadyExistsException {
  return _class (JMod.PUBLIC,name,ClassType.ENUM);
}

origin: com.unquietcode.tools.jcodemodel/codemodel

/**
 * Add an annotationType Declaration to this package
 * @param name
 *      Name of the annotation Type declaration to be added to this package
 * @return
 *      newly created Annotation Type Declaration
 * @exception JClassAlreadyExistsException
 *      When the specified class/interface was already created.
 
 */
public JDefinedClass _annotationTypeDeclaration(String name) throws JClassAlreadyExistsException {
  return _class (JMod.PUBLIC,name,ClassType.ANNOTATION_TYPE_DECL);
}
origin: com.unquietcode.tools.jcodemodel/codemodel

/**
 * Add a new public nested class to this class.
 */
public JDefinedClass _class(String name)
  throws JClassAlreadyExistsException {
  return _class(JMod.PUBLIC, name);
}
origin: javaee/jaxb-v2

/**
 * Add a public enum to this package
 * @param name
 *      Name of the enum to be added to this package
 * @return
 *      newly created Enum
 * @exception JClassAlreadyExistsException
 *      When the specified class/interface was already created.
 
 */
public JDefinedClass _enum (String name) throws JClassAlreadyExistsException {
  return _class (JMod.PUBLIC,name,ClassType.ENUM);
}

origin: javaee/jaxb-v2

/**
 * Add an annotationType Declaration to this package
 * @param name
 *      Name of the annotation Type declaration to be added to this package
 * @return
 *      newly created Annotation Type Declaration
 * @exception JClassAlreadyExistsException
 *      When the specified class/interface was already created.
 
 */
public JDefinedClass _annotationTypeDeclaration(String name) throws JClassAlreadyExistsException {
  return _class (JMod.PUBLIC,name,ClassType.ANNOTATION_TYPE_DECL);
}
origin: javaee/jaxb-v2

/**
 * Add a new public nested class to this class.
 */
public JDefinedClass _class(String name)
  throws JClassAlreadyExistsException {
  return _class(JMod.PUBLIC, name);
}
origin: org.glassfish.metro/webservices-tools

/**
 * Add a public enum to this package
 * @param name
 *      Name of the enum to be added to this package
 * @return
 *      newly created Enum
 * @exception JClassAlreadyExistsException
 *      When the specified class/interface was already created.
 
 */
public JDefinedClass _enum (String name) throws JClassAlreadyExistsException {
  return _class (JMod.PUBLIC,name,ClassType.ENUM);
}

origin: sun-jaxb/jaxb-xjc

/**
 * Add a new public nested class to this class.
 */
public JDefinedClass _class(String name)
  throws JClassAlreadyExistsException {
  return _class(JMod.PUBLIC, name);
}
origin: com.sap.cloud.yaas.service-generator/service-generator-model-raml

private JDefinedClass createInternalOneOfClass(final String nodeName, final JDefinedClass jclass)
    throws JClassAlreadyExistsException
{
  final String clazzName = WordUtils.capitalize(nodeName + WordUtils.capitalize(JSONSchemaUtil.ONE_OF));
  return jclass._class(JMod.STATIC | JMod.PRIVATE, clazzName, ClassType.CLASS);
}
origin: org.jvnet.hyperjaxb2/hyperjaxb2-core

protected JDefinedClass generateClass() throws JClassAlreadyExistsException {
 final JDefinedClass theClass = enumClass._class(JMod.PUBLIC | JMod.STATIC, "Type");
 theClass._implements(UserType.class);
 theClass._implements(Serializable.class);
 return theClass;
}
origin: sabomichal/immutable-xjc

private JDefinedClass generateBuilderClass(JDefinedClass clazz) {
  JDefinedClass builderClass = null;
  String builderClassName = clazz.name() + "Builder";
  try {
    builderClass = clazz._class(JMod.PUBLIC | JMod.STATIC, builderClassName);
  } catch (JClassAlreadyExistsException e) {
    this.log(Level.WARNING, "builderClassExists", builderClassName);
  }
  return builderClass;
}
origin: mklemm/jaxb2-rich-contract-plugin

private void generateBuilderInterface(final Map<String, BuilderOutline> builderOutlines, final DefinedInterfaceOutline interfaceOutline) throws SAXException {
  try {
    builderOutlines.put(interfaceOutline.getImplClass().fullName(), new BuilderOutline(interfaceOutline,
        /* interfaceOutline.getImplClass()._class(JMod.NONE, this.settings.getBuilderGeneratorSettings().getFluentClassName().getInterfaceName(), ClassType.INTERFACE) */
        interfaceOutline.getImplClass()._class(JMod.NONE, this.settings.getBuilderGeneratorSettings().getBuilderClassName().getInterfaceName(), ClassType.INTERFACE)
        /*interfaceOutline.getImplClass()._class(JMod.NONE, this.settings.getBuilderGeneratorSettings().getWrapperClassName().getInterfaceName(), ClassType.INTERFACE),
        interfaceOutline.getImplClass()._class(JMod.NONE, this.settings.getBuilderGeneratorSettings().getModifierClassName().getInterfaceName(), ClassType.INTERFACE) */
        ));
  } catch (final JClassAlreadyExistsException e) {
    this.pluginContext.errorHandler.error(new SAXParseException(MessageFormat.format(GroupInterfaceGenerator.RESOURCE_BUNDLE.getString("error.interface-exists"), interfaceOutline.getImplClass().fullName(), PluginContext.BUILDER_INTERFACE_NAME), interfaceOutline.getSchemaComponent().getLocator()));
  }
}
origin: org.kuali.rice/rice-development-tools

private void renderConstantsClass(JDefinedClass classModel) throws Exception {
  
  // define constants class
  JDefinedClass constantsClass = classModel._class(JMod.STATIC, Util.CONSTANTS_CLASS_NAME);
  
  // generate the javadoc on the top of the Constants class
  JDocComment javadoc = constantsClass.javadoc();
  javadoc.append(Util.CONSTANTS_CLASS_JAVADOC);
  
  // render root element name
  JFieldVar rootElementField = constantsClass.field(JMod.FINAL | JMod.STATIC, String.class, Util.ROOT_ELEMENT_NAME_FIELD);
  rootElementField.init(JExpr.lit(Util.toLowerCaseFirstLetter(classModel.name())));
  
  // render type name
  JFieldVar typeNameField = constantsClass.field(JMod.FINAL | JMod.STATIC, String.class, Util.TYPE_NAME_FIELD);
  typeNameField.init(JExpr.lit(classModel.name() + Util.TYPE_NAME_SUFFIX));
  
}

com.sun.codemodelJDefinedClass_class

Javadoc

Add a new nested class to this class.

Popular methods of JDefinedClass

  • method
  • _extends
  • field
  • _implements
  • name
    JClass name accessor. For example, for java.util.List, this method returns "List""
  • constructor
    Adds a constructor to this class.
  • fields
    Returns all the fields declred in this class. The returned Map is a read-only live view.
  • annotate
    Adding ability to annotate a class
  • fullName
    Gets the fully qualified name of this class.
  • methods
  • owner
  • javadoc
    Creates, if necessary, and returns the class javadoc for this JDefinedClass
  • owner,
  • javadoc,
  • getMethod,
  • _package,
  • dotclass,
  • enumConstant,
  • staticInvoke,
  • staticRef,
  • init

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (Timer)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now