Codota Logo
JDefinedClass.fullName
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain JDefinedClass
private void myMethod () {
JDefinedClass j =
  • Codota IconJCodeModel codeModel;String fullyqualifiedName;codeModel._class(fullyqualifiedName)
  • Codota IconJClassAlreadyExistsException e;e.getExistingClass()
  • Codota IconJCodeModel cm;String fullyqualifiedName;ClassType t;cm._class(fullyqualifiedName, t)
  • Smart code suggestions by Codota
}
origin: joelittlejohn/jsonschema2pojo

  public static void addSerializableSupport(JDefinedClass jclass) {
    jclass._implements(Serializable.class);

    try {

      final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
      final DataOutputStream dataOutputStream = new DataOutputStream(byteArrayOutputStream);

      processDefinedClassForSerializableSupport(jclass, dataOutputStream);

      dataOutputStream.flush();

      final MessageDigest digest = MessageDigest.getInstance("SHA");
      final byte[] digestBytes = digest.digest(byteArrayOutputStream.toByteArray());
      long serialVersionUID = 0L;

      for (int i = Math.min(digestBytes.length, 8) - 1; i >= 0; i--) {
        serialVersionUID = serialVersionUID << 8 | digestBytes[i] & 0xff;
      }

      JFieldVar  serialUIDField = jclass.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, long.class, "serialVersionUID");
      serialUIDField.init(JExpr.lit(serialVersionUID));

    } catch (IOException exception) {
      throw new GenerationException("IOException while generating serialversionUID field while adding serializable support to class: " + jclass.fullName(), exception);
    } catch (NoSuchAlgorithmException exception) {
      throw new GenerationException("SHA algorithm not found when trying to generate serialversionUID field while adding serializable support to class: " + jclass.fullName(), exception);
    }
  }
}
origin: joelittlejohn/jsonschema2pojo

private static void processDefinedClassForSerializableSupport(JDefinedClass jclass, DataOutputStream dataOutputStream) throws IOException {
  dataOutputStream.writeUTF(jclass.fullName());
  dataOutputStream.writeInt(jclass.mods().getValue());
  while (classes.hasNext()) {
    JDefinedClass nestedClass = classes.next();
    sortedClasses.put(nestedClass.fullName(), nestedClass);
origin: com.haulmont.thirdparty/eclipselink

/**
 * Returns the raw name of this <code>JavaClass</code>.  Array types will
 * have "[]" appended to the name.
 *
 * @return the <code>String</code> raw name of this <code>JavaClass</code>.
 */
public String getRawName() {
  if(isArray) {
    return xjcClass.fullName() + "[]";
  }
  return xjcClass.fullName();
}
origin: com.github.jaxb-xew-plugin/jaxb-xew-plugin

/**
 * Container class name
 */
public String getClassName() {
  return candidateClass.fullName();
}
origin: com.sun.codemodel/codemodel

/**
 * Returns the name of this constant.
 *
 * @return never null.
 */
public String getName() {
  return this.type.fullName().concat(".").concat(this.name);
}
origin: org.glassfish.metro/webservices-tools

/**
 * Returns the name of this constant.
 *
 * @return never null.
 */
public String getName() {
  return this.type.fullName().concat(".").concat(this.name);
}
origin: com.unquietcode.tools.jcodemodel/codemodel

/**
 * Returns the name of this constant.
 *
 * @return never null.
 */
public String getName() {
  return this.type.fullName().concat(".").concat(this.name);
}
origin: javaee/jaxb-v2

/**
 * Returns the name of this constant.
 *
 * @return never null.
 */
public String getName() {
  return this.type.fullName().concat(".").concat(this.name);
}
origin: com.googlecode.androidannotations/androidannotations

public EBeanHolder create(Element element, Class<? extends Annotation> eBeanAnnotation, JDefinedClass generatedClass) {
  String qualifiedName = generatedClass.fullName();
  originatingElementsByGeneratedClassQualifiedName.put(qualifiedName, element);
  EBeanHolder activityHolder = new EBeanHolder(this, eBeanAnnotation, generatedClass);
  eBeanHolders.put(element, activityHolder);
  return activityHolder;
}
origin: com.sun.codemodel/codemodel

@Override
public String binaryName() {
  if (outer instanceof JDefinedClass)
    return ((JDefinedClass) outer).binaryName() + '$' + name();
  else
    return fullName();
}
origin: org.glassfish.metro/webservices-tools

@Override
public String binaryName() {
  if (outer instanceof JDefinedClass)
    return ((JDefinedClass) outer).binaryName() + '$' + name();
  else
    return fullName();
}
origin: com.envoisolutions.sxc/sxc-jaxb

public void addDependency(JClass dependency) {
  if (jaxbObjectClass.fullName().equals(dependency.fullName())) return;
  
  if (parent == null) {
    if (dependencies.add(dependency.fullName())) {
      superInvocation.arg(dependency.dotclass());
    }
  } else {
    parent.addDependency(dependency);
  }
}
origin: phoenixnap/springmvc-raml-plugin

  @Override
  public JFieldVar apply(ApiResourceMetadata controllerMetadata, JDefinedClass generatableType) {
    if (!generatableType._implements().hasNext()) {
      throw new RuleCanNotProcessModelException(
          "The class " + generatableType.fullName() + " does not implement a super class that can be delegated to.");
    }
    JClass controllerInterface = generatableType._implements().next();
    JFieldVar field = generatableType.field(JMod.PRIVATE, controllerInterface, delegateFieldName);
    field.annotate(Autowired.class);
    return field;
  }
}
origin: org.jvnet.jaxb2_commons/tools

public static String getClassName(final JDefinedClass theClass) {
  return (theClass.outer() == null ? theClass.fullName()
      : getClassName((JDefinedClass) theClass.outer()) + "$"
          + theClass.name());
}
 
origin: org.graylog2/graylog2-rest-routes

  private void addRouterMethod(JDefinedClass router, JDefinedClass definedClass) {
    String className = definedClass.fullName();
    JMethod method = router.method(generateMods, definedClass, definedClass.name());
    JBlock block = method.body();
    block.directStatement("return new " + className + "();");
  }
}
origin: org.jvnet.jaxb2_commons/tools

public static String getPackagedClassName(final JDefinedClass theClass) {
  return (theClass.outer() == null ? theClass.fullName()
      : getPackagedClassName((JDefinedClass) theClass.outer()) + "$"
          + theClass.name());
}
origin: com.sun.codemodel/codemodel

/**
 * Gets the fully qualified name of this class.
 */
public String fullName() {
  if (outer instanceof JDefinedClass)
    return ((JDefinedClass) outer).fullName() + '.' + name();
  JPackage p = _package();
  if (p.isUnnamed())
    return name();
  else
    return p.name() + '.' + name();
}
origin: org.glassfish.metro/webservices-tools

/**
 * Gets the fully qualified name of this class.
 */
public String fullName() {
  if (outer instanceof JDefinedClass)
    return ((JDefinedClass) outer).fullName() + '.' + name();
  JPackage p = _package();
  if (p.isUnnamed())
    return name();
  else
    return p.name() + '.' + name();
}
origin: javaee/jaxb-v2

/**
 * Gets the fully qualified name of this class.
 */
public String fullName() {
  if (outer instanceof JDefinedClass)
    return ((JDefinedClass) outer).fullName() + '.' + name();
  JPackage p = _package();
  if (p.isUnnamed())
    return name();
  else
    return p.name() + '.' + name();
}
origin: org.metatype.sxc/sxc-jaxb

private JInvocation invokeEnumParser(JAXBObjectBuilder caller, JVar callerXsrVar, JAXBEnumBuilder parser, JExpression value) {
  // Declare dependency from caller to parser
  caller.addDependency(parser.getJAXBEnumClass());
  // Add a static import for the parse method on the existing builder class
  String methodName = "parse" + parser.getType().getSimpleName();
  JStaticImports staticImports = JStaticImports.getStaticImports(caller.getJAXBObjectClass());
  staticImports.addStaticImport(parser.getJAXBEnumClass().fullName() + "." + methodName);
  // Call the static method
  JInvocation invocation = JExpr.invoke(methodName).arg(callerXsrVar).arg(caller.getReadContextVar()).arg(value);
  return invocation;
}
com.sun.codemodelJDefinedClassfullName

Javadoc

Gets the fully qualified name of 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
  • methods
  • owner
  • javadoc
    Creates, if necessary, and returns the class javadoc for this JDefinedClass
  • _class
    Add a new public nested class to this class.
  • javadoc,
  • _class,
  • getMethod,
  • _package,
  • dotclass,
  • enumConstant,
  • staticInvoke,
  • staticRef,
  • init

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • JOptionPane (javax.swing)
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now