congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
JDefinedClass.fullName
Code IndexAdd Tabnine 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)

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

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (Timer)
  • getExternalFilesDir (Context)
  • onCreateOptionsMenu (Activity)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • From CI to AI: The AI layer in your organization
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