Giter Club home page Giter Club logo

Comments (3)

mwinkels avatar mwinkels commented on August 29, 2024

Here is a patch for this issue:

From e192e2fbc792887a720cb3e3289cf7a81e54988b Mon Sep 17 00:00:00 2001
From: Maarten Winkels [email protected]
Date: Fri, 13 Jul 2012 14:57:14 +0200
Subject: [PATCH] Fix for issue #43: Use @XmlAccesorType in package-info.java.


.../main/java/com/lunatech/doclets/jax/Utils.java | 4 ++++
.../lunatech/doclets/jax/jaxb/model/JAXBClass.java | 5 ++++-
2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/doclets/src/main/java/com/lunatech/doclets/jax/Utils.java b/doclets/src/main/java/com/lunatech/doclets/jax/Utils.java
index 61f38a8..57fcd40 100644
--- a/doclets/src/main/java/com/lunatech/doclets/jax/Utils.java
+++ b/doclets/src/main/java/com/lunatech/doclets/jax/Utils.java
@@ -166,6 +166,10 @@ public class Utils {
return findAnnotation(parameter.annotations(), soughtAnnotations);
}

  • public static AnnotationDesc findAnnotation(final PackageDoc pack, final Class<?>... soughtAnnotations) {
  • return findAnnotation(pack.annotations(), soughtAnnotations);
  • }
  • public static AnnotationDesc findAnnotation(final AnnotationDesc[] annotations, final Class<?>... soughtAnnotations) {
    for (final AnnotationDesc annotation : annotations) {
    final AnnotationTypeDoc annotationType = annotation.annotationType();
    diff --git a/doclets/src/main/java/com/lunatech/doclets/jax/jaxb/model/JAXBClass.java b/doclets/src/main/java/com/lunatech/doclets/jax/jaxb/model/JAXBClass.java
    index 425f913..2817caa 100644
    --- a/doclets/src/main/java/com/lunatech/doclets/jax/jaxb/model/JAXBClass.java
    +++ b/doclets/src/main/java/com/lunatech/doclets/jax/jaxb/model/JAXBClass.java
    @@ -84,8 +84,11 @@ public class JAXBClass implements Comparable {
    private void setupMembers(ClassDoc klass) {
    ClassDoc accessorAnnotationType = Utils.findAnnotatedClass(klass, XmlAccessorType.class);
    AnnotationDesc accessorAnnotation = null;
  • if (accessorAnnotationType != null)
  • if (accessorAnnotationType != null) {
    accessorAnnotation = Utils.findAnnotation(accessorAnnotationType, XmlAccessorType.class);
  • } else {
  •  accessorAnnotation = Utils.findAnnotation(klass.containingPackage(), XmlAccessorType.class);
    
  • }
    XmlAccessType accessType = XmlAccessType.PUBLIC_MEMBER;
    // System.err.println("Accessor: " + accessorAnnotation);
    if (accessorAnnotation != null) {
    --
    1.7.8.msysgit.0

from jax-doclets.

FroMage avatar FroMage commented on August 29, 2024

Thanks. Could you do a pull request for this please?

from jax-doclets.

FroMage avatar FroMage commented on August 29, 2024

Sorry you already did, thanks a lot :)

from jax-doclets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.