congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
JDefinedClass.annotations
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.glassfish.metro/webservices-tools

public boolean run( Outline model, Options opt, ErrorHandler errorHandler ) {
  for( ClassOutline co : model.getClasses() ) {
    Iterator<JAnnotationUse> ann = co.ref.annotations().iterator();
    while (ann.hasNext()) {
      try {
        JAnnotationUse a = ann.next();
        Field clazzField = a.getClass().getDeclaredField("clazz");
        clazzField.setAccessible(true);
        JClass cl = (JClass) clazzField.get(a);
        if (cl.equals(model.getCodeModel()._ref(XmlAccessorType.class))) {
          a.param("value", XmlAccessType.PROPERTY);
          break;
        }
      } catch (IllegalArgumentException ex) {
        Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
      } catch (IllegalAccessException ex) {
        Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
      } catch (NoSuchFieldException ex) {
        Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
      } catch (SecurityException ex) {
        Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
      }
    }
  }        
  return true;
}

origin: apache/servicemix-bundles

public boolean run( Outline model, Options opt, ErrorHandler errorHandler ) {
  for( ClassOutline co : model.getClasses() ) {
    Iterator<JAnnotationUse> ann = co.ref.annotations().iterator();
    while (ann.hasNext()) {
      try {
        JAnnotationUse a = ann.next();
        Field clazzField = a.getClass().getDeclaredField("clazz");
        clazzField.setAccessible(true);
        JClass cl = (JClass) clazzField.get(a);
        if (cl.equals(model.getCodeModel()._ref(XmlAccessorType.class))) {
          a.param("value", XmlAccessType.PROPERTY);
          break;
        }
      } catch (IllegalArgumentException ex) {
        Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
      } catch (IllegalAccessException ex) {
        Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
      } catch (NoSuchFieldException ex) {
        Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
      } catch (SecurityException ex) {
        Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
      }
    }
  }        
  return true;
}

origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc

public boolean run( Outline model, Options opt, ErrorHandler errorHandler ) {
  for( ClassOutline co : model.getClasses() ) {
    Iterator<JAnnotationUse> ann = co.ref.annotations().iterator();
    while (ann.hasNext()) {
      try {
        JAnnotationUse a = ann.next();
        Field clazzField = a.getClass().getDeclaredField("clazz");
        clazzField.setAccessible(true);
        JClass cl = (JClass) clazzField.get(a);
        if (cl.equals(model.getCodeModel()._ref(XmlAccessorType.class))) {
          a.param("value", XmlAccessType.PROPERTY);
          break;
        }
      } catch (IllegalArgumentException ex) {
        Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
      } catch (IllegalAccessException ex) {
        Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
      } catch (NoSuchFieldException ex) {
        Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
      } catch (SecurityException ex) {
        Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
      }
    }
  }        
  return true;
}

origin: com.tomitribe.tribestream/tribestream-xjc

  @Override
  protected void onClass(final ClassOutline classOutline) {
    String namespace = null;
    for (final JAnnotationUse annot : classOutline.implClass.annotations()) {
      final String fullName = annot.getAnnotationClass().fullName();
      if (xmlTypeName.equals(fullName)) {
        final JAnnotationValue value = annot.getAnnotationMembers().get("namespace");
        if (value != null) {
          final StringWriter w = new StringWriter();
          value.generate(new JFormatter(w));
          namespace = w.toString();
          namespace = namespace.substring(1, namespace.length() - 1); // remove quotes
        }
      } else if (xmlRootEltName.equals(fullName)) {
        namespace = null;
        break;
      }
    }
    if (null == namespace) {
      return;
    }
    classOutline.implClass.annotate(XmlRootElement.class)
        .param("namespace", namespace)
        .param("name", toXml(classOutline.implClass.name()));
  }
}
com.sun.codemodelJDefinedClassannotations

Javadoc

Annotations on this variable. Lazily created.

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,
  • _class,
  • getMethod,
  • _package,
  • dotclass,
  • enumConstant,
  • staticInvoke,
  • staticRef,
  • init

Popular in Java

  • Parsing JSON documents to java classes using gson
  • findViewById (Activity)
  • setScale (BigDecimal)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • JPanel (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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