com.sun.xml.bind_2.2.0.v201105210647

16:34:34.071 INFO  jd.cli.Main - Decompiling com.sun.xml.bind_2.2.0.v201105210647.jar
package com.sun.istack;

public abstract interface Builder<T>
{
  public abstract T build();
}

/* Location:
 * Qualified Name:     com.sun.istack.Builder
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import javax.activation.DataSource;

public final class ByteArrayDataSource
  implements DataSource
{
  private final String contentType;
  private final byte[] buf;
  private final int len;
  
  public ByteArrayDataSource(byte[] buf, String contentType)
  {
    this(buf, buf.length, contentType);
  }
  
  public ByteArrayDataSource(byte[] buf, int length, String contentType)
  {
    this.buf = buf;
    len = length;
    this.contentType = contentType;
  }
  
  public String getContentType()
  {
    if (contentType == null) {
      return "application/octet-stream";
    }
    return contentType;
  }
  
  public InputStream getInputStream()
  {
    return new ByteArrayInputStream(buf, 0, len);
  }
  
  public String getName()
  {
    return null;
  }
  
  public OutputStream getOutputStream()
  {
    throw new UnsupportedOperationException();
  }
}

/* Location:
 * Qualified Name:     com.sun.istack.ByteArrayDataSource
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack;

import java.util.ArrayList;
import java.util.Collection;

public final class FinalArrayList<T>
  extends ArrayList<T>
{
  public FinalArrayList(int initialCapacity)
  {
    super(initialCapacity);
  }
  
  public FinalArrayList() {}
  
  public FinalArrayList(Collection<? extends T> ts)
  {
    super(ts);
  }
}

/* Location:
 * Qualified Name:     com.sun.istack.FinalArrayList
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack;

import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLFilterImpl;

public class FragmentContentHandler
  extends XMLFilterImpl
{
  public FragmentContentHandler() {}
  
  public FragmentContentHandler(XMLReader parent)
  {
    super(parent);
  }
  
  public FragmentContentHandler(ContentHandler handler)
  {
    setContentHandler(handler);
  }
  
  public void startDocument()
    throws SAXException
  {}
  
  public void endDocument()
    throws SAXException
  {}
}

/* Location:
 * Qualified Name:     com.sun.istack.FragmentContentHandler
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack;

import java.lang.annotation.Annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Documented
@Retention(RetentionPolicy.CLASS)
@Target({java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.LOCAL_VARIABLE})
public @interface Interned {}

/* Location:
 * Qualified Name:     com.sun.istack.Interned
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack;

import java.lang.annotation.Annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Documented
@Retention(RetentionPolicy.CLASS)
@Target({java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.LOCAL_VARIABLE})
public @interface NotNull {}

/* Location:
 * Qualified Name:     com.sun.istack.NotNull
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack;

import java.lang.annotation.Annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Documented
@Retention(RetentionPolicy.CLASS)
@Target({java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.LOCAL_VARIABLE})
public @interface Nullable {}

/* Location:
 * Qualified Name:     com.sun.istack.Nullable
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack;

import java.lang.ref.WeakReference;
import java.util.concurrent.ConcurrentLinkedQueue;

public abstract class Pool$Impl<T>
  implements Pool<T>
{
  private volatile WeakReference<ConcurrentLinkedQueue<T>> queue;
  
  @NotNull
  public final T take()
  {
    T t = getQueue().poll();
    if (t == null) {
      return (T)create();
    }
    return t;
  }
  
  public final void recycle(T t)
  {
    getQueue().offer(t);
  }
  
  private ConcurrentLinkedQueue<T> getQueue()
  {
    WeakReference<ConcurrentLinkedQueue<T>> q = queue;
    if (q != null)
    {
      ConcurrentLinkedQueue<T> d = (ConcurrentLinkedQueue)q.get();
      if (d != null) {
        return d;
      }
    }
    ConcurrentLinkedQueue<T> d = new ConcurrentLinkedQueue();
    queue = new WeakReference(d);
    
    return d;
  }
  
  @NotNull
  protected abstract T create();
}

/* Location:
 * Qualified Name:     com.sun.istack.Pool.Impl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack;

import java.lang.ref.WeakReference;
import java.util.concurrent.ConcurrentLinkedQueue;

public abstract interface Pool<T>
{
  @NotNull
  public abstract T take();
  
  public abstract void recycle(@NotNull T paramT);
  
  public static abstract class Impl<T>
    implements Pool<T>
  {
    private volatile WeakReference<ConcurrentLinkedQueue<T>> queue;
    
    @NotNull
    public final T take()
    {
      T t = getQueue().poll();
      if (t == null) {
        return (T)create();
      }
      return t;
    }
    
    public final void recycle(T t)
    {
      getQueue().offer(t);
    }
    
    private ConcurrentLinkedQueue<T> getQueue()
    {
      WeakReference<ConcurrentLinkedQueue<T>> q = queue;
      if (q != null)
      {
        ConcurrentLinkedQueue<T> d = (ConcurrentLinkedQueue)q.get();
        if (d != null) {
          return d;
        }
      }
      ConcurrentLinkedQueue<T> d = new ConcurrentLinkedQueue();
      queue = new WeakReference(d);
      
      return d;
    }
    
    @NotNull
    protected abstract T create();
  }
}

/* Location:
 * Qualified Name:     com.sun.istack.Pool
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack;

import org.xml.sax.SAXException;

public class SAXException2
  extends SAXException
{
  public SAXException2(String message)
  {
    super(message);
  }
  
  public SAXException2(Exception e)
  {
    super(e);
  }
  
  public SAXException2(String message, Exception e)
  {
    super(message, e);
  }
  
  public Throwable getCause()
  {
    return getException();
  }
}

/* Location:
 * Qualified Name:     com.sun.istack.SAXException2
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack;

import org.xml.sax.Locator;
import org.xml.sax.SAXParseException;

public class SAXParseException2
  extends SAXParseException
{
  public SAXParseException2(String message, Locator locator)
  {
    super(message, locator);
  }
  
  public SAXParseException2(String message, Locator locator, Exception e)
  {
    super(message, locator, e);
  }
  
  public SAXParseException2(String message, String publicId, String systemId, int lineNumber, int columnNumber)
  {
    super(message, publicId, systemId, lineNumber, columnNumber);
  }
  
  public SAXParseException2(String message, String publicId, String systemId, int lineNumber, int columnNumber, Exception e)
  {
    super(message, publicId, systemId, lineNumber, columnNumber, e);
  }
  
  public Throwable getCause()
  {
    return getException();
  }
}

/* Location:
 * Qualified Name:     com.sun.istack.SAXParseException2
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack;

import javax.xml.stream.Location;
import javax.xml.stream.XMLStreamException;

public class XMLStreamException2
  extends XMLStreamException
{
  public XMLStreamException2(String msg)
  {
    super(msg);
  }
  
  public XMLStreamException2(Throwable th)
  {
    super(th);
  }
  
  public XMLStreamException2(String msg, Throwable th)
  {
    super(msg, th);
  }
  
  public XMLStreamException2(String msg, Location location)
  {
    super(msg, location);
  }
  
  public XMLStreamException2(String msg, Location location, Throwable th)
  {
    super(msg, location, th);
  }
  
  public Throwable getCause()
  {
    return getNestedException();
  }
}

/* Location:
 * Qualified Name:     com.sun.istack.XMLStreamException2
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack;

import javax.xml.stream.Location;
import javax.xml.stream.XMLStreamReader;
import org.xml.sax.Locator;

class XMLStreamReaderToContentHandler$1
  implements Locator
{
  XMLStreamReaderToContentHandler$1(XMLStreamReaderToContentHandler paramXMLStreamReaderToContentHandler) {}
  
  public int getColumnNumber()
  {
    return XMLStreamReaderToContentHandler.access$000(this$0).getLocation().getColumnNumber();
  }
  
  public int getLineNumber()
  {
    return XMLStreamReaderToContentHandler.access$000(this$0).getLocation().getLineNumber();
  }
  
  public String getPublicId()
  {
    return XMLStreamReaderToContentHandler.access$000(this$0).getLocation().getPublicId();
  }
  
  public String getSystemId()
  {
    return XMLStreamReaderToContentHandler.access$000(this$0).getLocation().getSystemId();
  }
}

/* Location:
 * Qualified Name:     com.sun.istack.XMLStreamReaderToContentHandler.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack;

import javax.xml.namespace.QName;
import javax.xml.stream.Location;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.AttributesImpl;

public class XMLStreamReaderToContentHandler
{
  private final XMLStreamReader staxStreamReader;
  private final ContentHandler saxHandler;
  private final boolean eagerQuit;
  private final boolean fragment;
  private final String[] inscopeNamespaces;
  
  public XMLStreamReaderToContentHandler(XMLStreamReader staxCore, ContentHandler saxCore, boolean eagerQuit, boolean fragment)
  {
    this(staxCore, saxCore, eagerQuit, fragment, new String[0]);
  }
  
  public XMLStreamReaderToContentHandler(XMLStreamReader staxCore, ContentHandler saxCore, boolean eagerQuit, boolean fragment, String[] inscopeNamespaces)
  {
    staxStreamReader = staxCore;
    saxHandler = saxCore;
    this.eagerQuit = eagerQuit;
    this.fragment = fragment;
    this.inscopeNamespaces = inscopeNamespaces;
    assert (inscopeNamespaces.length % 2 == 0);
  }
  
  public void bridge()
    throws XMLStreamException
  {
    try
    {
      int depth = 0;
      
      int event = staxStreamReader.getEventType();
      if (event == 7) {
        while (!staxStreamReader.isStartElement()) {
          event = staxStreamReader.next();
        }
      }
      if (event != 1) {
        throw new IllegalStateException("The current event is not START_ELEMENT\n but " + event);
      }
      handleStartDocument();
      for (int i = 0; i < inscopeNamespaces.length; i += 2) {
        saxHandler.startPrefixMapping(inscopeNamespaces[i], inscopeNamespaces[(i + 1)]);
      }
      do
      {
        switch (event)
        {
        case 1: 
          depth++;
          handleStartElement();
          break;
        case 2: 
          handleEndElement();
          depth--;
          if ((depth != 0) || (!eagerQuit)) {
            break;
          }
          break;
        case 4: 
          handleCharacters();
          break;
        case 9: 
          handleEntityReference();
          break;
        case 3: 
          handlePI();
          break;
        case 5: 
          handleComment();
          break;
        case 11: 
          handleDTD();
          break;
        case 10: 
          handleAttribute();
          break;
        case 13: 
          handleNamespace();
          break;
        case 12: 
          handleCDATA();
          break;
        case 15: 
          handleEntityDecl();
          break;
        case 14: 
          handleNotationDecl();
          break;
        case 6: 
          handleSpace();
          break;
        case 7: 
        case 8: 
        default: 
          throw new InternalError("processing event: " + event);
        }
        event = staxStreamReader.next();
      } while (depth != 0);
      for (int i = 0; i < inscopeNamespaces.length; i += 2) {
        saxHandler.endPrefixMapping(inscopeNamespaces[i]);
      }
      handleEndDocument();
    }
    catch (SAXException e)
    {
      throw new XMLStreamException2(e);
    }
  }
  
  private void handleEndDocument()
    throws SAXException
  {
    if (fragment) {
      return;
    }
    saxHandler.endDocument();
  }
  
  private void handleStartDocument()
    throws SAXException
  {
    if (fragment) {
      return;
    }
    saxHandler.setDocumentLocator(new Locator()
    {
      public int getColumnNumber()
      {
        return staxStreamReader.getLocation().getColumnNumber();
      }
      
      public int getLineNumber()
      {
        return staxStreamReader.getLocation().getLineNumber();
      }
      
      public String getPublicId()
      {
        return staxStreamReader.getLocation().getPublicId();
      }
      
      public String getSystemId()
      {
        return staxStreamReader.getLocation().getSystemId();
      }
    });
    saxHandler.startDocument();
  }
  
  private void handlePI()
    throws XMLStreamException
  {
    try
    {
      saxHandler.processingInstruction(staxStreamReader.getPITarget(), staxStreamReader.getPIData());
    }
    catch (SAXException e)
    {
      throw new XMLStreamException2(e);
    }
  }
  
  private void handleCharacters()
    throws XMLStreamException
  {
    try
    {
      saxHandler.characters(staxStreamReader.getTextCharacters(), staxStreamReader.getTextStart(), staxStreamReader.getTextLength());
    }
    catch (SAXException e)
    {
      throw new XMLStreamException2(e);
    }
  }
  
  private void handleEndElement()
    throws XMLStreamException
  {
    QName qName = staxStreamReader.getName();
    try
    {
      String pfix = qName.getPrefix();
      String rawname = pfix + ':' + qName.getLocalPart();
      
      saxHandler.endElement(qName.getNamespaceURI(), qName.getLocalPart(), rawname);
      
      int nsCount = staxStreamReader.getNamespaceCount();
      for (int i = nsCount - 1; i >= 0; i--)
      {
        String prefix = staxStreamReader.getNamespacePrefix(i);
        if (prefix == null) {
          prefix = "";
        }
        saxHandler.endPrefixMapping(prefix);
      }
    }
    catch (SAXException e)
    {
      throw new XMLStreamException2(e);
    }
  }
  
  private void handleStartElement()
    throws XMLStreamException
  {
    try
    {
      int nsCount = staxStreamReader.getNamespaceCount();
      for (int i = 0; i < nsCount; i++) {
        saxHandler.startPrefixMapping(fixNull(staxStreamReader.getNamespacePrefix(i)), fixNull(staxStreamReader.getNamespaceURI(i)));
      }
      QName qName = staxStreamReader.getName();
      String prefix = qName.getPrefix();
      String rawname;
      String rawname;
      if ((prefix == null) || (prefix.length() == 0)) {
        rawname = qName.getLocalPart();
      } else {
        rawname = prefix + ':' + qName.getLocalPart();
      }
      Attributes attrs = getAttributes();
      saxHandler.startElement(qName.getNamespaceURI(), qName.getLocalPart(), rawname, attrs);
    }
    catch (SAXException e)
    {
      throw new XMLStreamException2(e);
    }
  }
  
  private static String fixNull(String s)
  {
    if (s == null) {
      return "";
    }
    return s;
  }
  
  private Attributes getAttributes()
  {
    AttributesImpl attrs = new AttributesImpl();
    
    int eventType = staxStreamReader.getEventType();
    if ((eventType != 10) && (eventType != 1)) {
      throw new InternalError("getAttributes() attempting to process: " + eventType);
    }
    for (int i = 0; i < staxStreamReader.getAttributeCount(); i++)
    {
      String uri = staxStreamReader.getAttributeNamespace(i);
      if (uri == null) {
        uri = "";
      }
      String localName = staxStreamReader.getAttributeLocalName(i);
      String prefix = staxStreamReader.getAttributePrefix(i);
      String qName;
      String qName;
      if ((prefix == null) || (prefix.length() == 0)) {
        qName = localName;
      } else {
        qName = prefix + ':' + localName;
      }
      String type = staxStreamReader.getAttributeType(i);
      String value = staxStreamReader.getAttributeValue(i);
      
      attrs.addAttribute(uri, localName, qName, type, value);
    }
    return attrs;
  }
  
  private void handleNamespace() {}
  
  private void handleAttribute() {}
  
  private void handleDTD() {}
  
  private void handleComment() {}
  
  private void handleEntityReference() {}
  
  private void handleSpace() {}
  
  private void handleNotationDecl() {}
  
  private void handleEntityDecl() {}
  
  private void handleCDATA() {}
}

/* Location:
 * Qualified Name:     com.sun.istack.XMLStreamReaderToContentHandler
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack.localization;

public abstract interface Localizable
{
  public static final String NOT_LOCALIZABLE = new String("\000");
  
  public abstract String getKey();
  
  public abstract Object[] getArguments();
  
  public abstract String getResourceBundleName();
}

/* Location:
 * Qualified Name:     com.sun.istack.localization.Localizable
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack.localization;

public final class LocalizableMessage
  implements Localizable
{
  private final String _bundlename;
  private final String _key;
  private final Object[] _args;
  
  public LocalizableMessage(String bundlename, String key, Object... args)
  {
    _bundlename = bundlename;
    _key = key;
    if (args == null) {
      args = new Object[0];
    }
    _args = args;
  }
  
  public String getKey()
  {
    return _key;
  }
  
  public Object[] getArguments()
  {
    return _args;
  }
  
  public String getResourceBundleName()
  {
    return _bundlename;
  }
}

/* Location:
 * Qualified Name:     com.sun.istack.localization.LocalizableMessage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack.localization;

public class LocalizableMessageFactory
{
  private final String _bundlename;
  
  public LocalizableMessageFactory(String bundlename)
  {
    _bundlename = bundlename;
  }
  
  public Localizable getMessage(String key, Object... args)
  {
    return new LocalizableMessage(_bundlename, key, args);
  }
}

/* Location:
 * Qualified Name:     com.sun.istack.localization.LocalizableMessageFactory
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack.localization;

import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;

public class Localizer
{
  private final Locale _locale;
  private final HashMap _resourceBundles;
  
  public Localizer()
  {
    this(Locale.getDefault());
  }
  
  public Localizer(Locale l)
  {
    _locale = l;
    _resourceBundles = new HashMap();
  }
  
  public Locale getLocale()
  {
    return _locale;
  }
  
  public String localize(Localizable l)
  {
    String key = l.getKey();
    if (key == Localizable.NOT_LOCALIZABLE) {
      return (String)l.getArguments()[0];
    }
    String bundlename = l.getResourceBundleName();
    try
    {
      ResourceBundle bundle = (ResourceBundle)_resourceBundles.get(bundlename);
      if (bundle == null)
      {
        try
        {
          bundle = ResourceBundle.getBundle(bundlename, _locale);
        }
        catch (MissingResourceException e)
        {
          int i = bundlename.lastIndexOf('.');
          if (i != -1)
          {
            String alternateBundleName = bundlename.substring(i + 1);
            try
            {
              bundle = ResourceBundle.getBundle(alternateBundleName, _locale);
            }
            catch (MissingResourceException e2)
            {
              return getDefaultMessage(l);
            }
          }
        }
        _resourceBundles.put(bundlename, bundle);
      }
      if (bundle == null) {
        return getDefaultMessage(l);
      }
      if (key == null) {
        key = "undefined";
      }
      String msg;
      try
      {
        msg = bundle.getString(key);
      }
      catch (MissingResourceException e)
      {
        msg = bundle.getString("undefined");
      }
      Object[] args = l.getArguments();
      for (int i = 0; i < args.length; i++) {
        if ((args[i] instanceof Localizable)) {
          args[i] = localize((Localizable)args[i]);
        }
      }
      return MessageFormat.format(msg, args);
    }
    catch (MissingResourceException e) {}
    return getDefaultMessage(l);
  }
  
  private String getDefaultMessage(Localizable l)
  {
    String key = l.getKey();
    Object[] args = l.getArguments();
    StringBuilder sb = new StringBuilder();
    sb.append("[failed to localize] ");
    sb.append(key);
    if (args != null)
    {
      sb.append('(');
      for (int i = 0; i < args.length; i++)
      {
        if (i != 0) {
          sb.append(", ");
        }
        sb.append(String.valueOf(args[i]));
      }
      sb.append(')');
    }
    return sb.toString();
  }
}

/* Location:
 * Qualified Name:     com.sun.istack.localization.Localizer
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.istack.logging;

import com.sun.istack.NotNull;
import java.util.StringTokenizer;
import java.util.logging.Level;

public class Logger
{
  private static final String WS_LOGGING_SUBSYSTEM_NAME_ROOT = "com.sun.metro";
  private static final String ROOT_WS_PACKAGE = "com.sun.xml.ws.";
  private static final Level METHOD_CALL_LEVEL_VALUE = Level.FINEST;
  private final String componentClassName;
  private final java.util.logging.Logger logger;
  
  protected Logger(String systemLoggerName, String componentName)
  {
    componentClassName = ("[" + componentName + "] ");
    logger = java.util.logging.Logger.getLogger(systemLoggerName);
  }
  
  @NotNull
  public static Logger getLogger(@NotNull Class<?> componentClass)
  {
    return new Logger(getSystemLoggerName(componentClass), componentClass.getName());
  }
  
  @NotNull
  public static Logger getLogger(@NotNull String customLoggerName, @NotNull Class<?> componentClass)
  {
    return new Logger(customLoggerName, componentClass.getName());
  }
  
  static final String getSystemLoggerName(@NotNull Class<?> componentClass)
  {
    StringBuilder sb = new StringBuilder(componentClass.getPackage().getName());
    int lastIndexOfWsPackage = sb.lastIndexOf("com.sun.xml.ws.");
    if (lastIndexOfWsPackage > -1)
    {
      sb.replace(0, lastIndexOfWsPackage + "com.sun.xml.ws.".length(), "");
      
      StringTokenizer st = new StringTokenizer(sb.toString(), ".");
      sb = new StringBuilder("com.sun.metro").append(".");
      if (st.hasMoreTokens())
      {
        String token = st.nextToken();
        if ("api".equals(token)) {
          token = st.nextToken();
        }
        sb.append(token);
      }
    }
    return sb.toString();
  }
  
  public void log(Level level, String message)
  {
    if (!logger.isLoggable(level)) {
      return;
    }
    logger.logp(level, componentClassName, getCallerMethodName(), message);
  }
  
  public void log(Level level, String message, Throwable thrown)
  {
    if (!logger.isLoggable(level)) {
      return;
    }
    logger.logp(level, componentClassName, getCallerMethodName(), message, thrown);
  }
  
  public void finest(String message)
  {
    if (!logger.isLoggable(Level.FINEST)) {
      return;
    }
    logger.logp(Level.FINEST, componentClassName, getCallerMethodName(), message);
  }
  
  public void finest(String message, Throwable thrown)
  {
    if (!logger.isLoggable(Level.FINEST)) {
      return;
    }
    logger.logp(Level.FINEST, componentClassName, getCallerMethodName(), message, thrown);
  }
  
  public void finer(String message)
  {
    if (!logger.isLoggable(Level.FINER)) {
      return;
    }
    logger.logp(Level.FINER, componentClassName, getCallerMethodName(), message);
  }
  
  public void finer(String message, Throwable thrown)
  {
    if (!logger.isLoggable(Level.FINER)) {
      return;
    }
    logger.logp(Level.FINER, componentClassName, getCallerMethodName(), message, thrown);
  }
  
  public void fine(String message)
  {
    if (!logger.isLoggable(Level.FINE)) {
      return;
    }
    logger.logp(Level.FINE, componentClassName, getCallerMethodName(), message);
  }
  
  public void fine(String message, Throwable thrown)
  {
    if (!logger.isLoggable(Level.FINE)) {
      return;
    }
    logger.logp(Level.FINE, componentClassName, getCallerMethodName(), message, thrown);
  }
  
  public void info(String message)
  {
    if (!logger.isLoggable(Level.INFO)) {
      return;
    }
    logger.logp(Level.INFO, componentClassName, getCallerMethodName(), message);
  }
  
  public void info(String message, Throwable thrown)
  {
    if (!logger.isLoggable(Level.INFO)) {
      return;
    }
    logger.logp(Level.INFO, componentClassName, getCallerMethodName(), message, thrown);
  }
  
  public void config(String message)
  {
    if (!logger.isLoggable(Level.CONFIG)) {
      return;
    }
    logger.logp(Level.CONFIG, componentClassName, getCallerMethodName(), message);
  }
  
  public void config(String message, Throwable thrown)
  {
    if (!logger.isLoggable(Level.CONFIG)) {
      return;
    }
    logger.logp(Level.CONFIG, componentClassName, getCallerMethodName(), message, thrown);
  }
  
  public void warning(String message)
  {
    if (!logger.isLoggable(Level.WARNING)) {
      return;
    }
    logger.logp(Level.WARNING, componentClassName, getCallerMethodName(), message);
  }
  
  public void warning(String message, Throwable thrown)
  {
    if (!logger.isLoggable(Level.WARNING)) {
      return;
    }
    logger.logp(Level.WARNING, componentClassName, getCallerMethodName(), message, thrown);
  }
  
  public void severe(String message)
  {
    if (!logger.isLoggable(Level.SEVERE)) {
      return;
    }
    logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), message);
  }
  
  public void severe(String message, Throwable thrown)
  {
    if (!logger.isLoggable(Level.SEVERE)) {
      return;
    }
    logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), message, thrown);
  }
  
  public boolean isMethodCallLoggable()
  {
    return logger.isLoggable(METHOD_CALL_LEVEL_VALUE);
  }
  
  public boolean isLoggable(Level level)
  {
    return logger.isLoggable(level);
  }
  
  public void setLevel(Level level)
  {
    logger.setLevel(level);
  }
  
  public void entering()
  {
    if (!logger.isLoggable(METHOD_CALL_LEVEL_VALUE)) {
      return;
    }
    logger.entering(componentClassName, getCallerMethodName());
  }
  
  public void entering(Object... parameters)
  {
    if (!logger.isLoggable(METHOD_CALL_LEVEL_VALUE)) {
      return;
    }
    logger.entering(componentClassName, getCallerMethodName(), parameters);
  }
  
  public void exiting()
  {
    if (!logger.isLoggable(METHOD_CALL_LEVEL_VALUE)) {
      return;
    }
    logger.exiting(componentClassName, getCallerMethodName());
  }
  
  public void exiting(Object result)
  {
    if (!logger.isLoggable(METHOD_CALL_LEVEL_VALUE)) {
      return;
    }
    logger.exiting(componentClassName, getCallerMethodName(), result);
  }
  
  public <T extends Throwable> T logSevereException(T exception, Throwable cause)
  {
    if (logger.isLoggable(Level.SEVERE)) {
      if (cause == null)
      {
        logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), exception.getMessage());
      }
      else
      {
        exception.initCause(cause);
        logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), exception.getMessage(), cause);
      }
    }
    return exception;
  }
  
  public <T extends Throwable> T logSevereException(T exception, boolean logCause)
  {
    if (logger.isLoggable(Level.SEVERE)) {
      if ((logCause) && (exception.getCause() != null)) {
        logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), exception.getMessage(), exception.getCause());
      } else {
        logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), exception.getMessage());
      }
    }
    return exception;
  }
  
  public <T extends Throwable> T logSevereException(T exception)
  {
    if (logger.isLoggable(Level.SEVERE)) {
      if (exception.getCause() == null) {
        logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), exception.getMessage());
      } else {
        logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), exception.getMessage(), exception.getCause());
      }
    }
    return exception;
  }
  
  public <T extends Throwable> T logException(T exception, Throwable cause, Level level)
  {
    if (logger.isLoggable(level)) {
      if (cause == null)
      {
        logger.logp(level, componentClassName, getCallerMethodName(), exception.getMessage());
      }
      else
      {
        exception.initCause(cause);
        logger.logp(level, componentClassName, getCallerMethodName(), exception.getMessage(), cause);
      }
    }
    return exception;
  }
  
  public <T extends Throwable> T logException(T exception, boolean logCause, Level level)
  {
    if (logger.isLoggable(level)) {
      if ((logCause) && (exception.getCause() != null)) {
        logger.logp(level, componentClassName, getCallerMethodName(), exception.getMessage(), exception.getCause());
      } else {
        logger.logp(level, componentClassName, getCallerMethodName(), exception.getMessage());
      }
    }
    return exception;
  }
  
  public <T extends Throwable> T logException(T exception, Level level)
  {
    if (logger.isLoggable(level)) {
      if (exception.getCause() == null) {
        logger.logp(level, componentClassName, getCallerMethodName(), exception.getMessage());
      } else {
        logger.logp(level, componentClassName, getCallerMethodName(), exception.getMessage(), exception.getCause());
      }
    }
    return exception;
  }
  
  private static String getCallerMethodName()
  {
    return getStackMethodName(5);
  }
  
  private static String getStackMethodName(int methodIndexInStack)
  {
    StackTraceElement[] stack = Thread.currentThread().getStackTrace();
    String methodName;
    String methodName;
    if (stack.length > methodIndexInStack + 1) {
      methodName = stack[methodIndexInStack].getMethodName();
    } else {
      methodName = "UNKNOWN METHOD";
    }
    return methodName;
  }
}

/* Location:
 * Qualified Name:     com.sun.istack.logging.Logger
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.xml.bind;

import com.sun.xml.bind.v2.runtime.reflect.Accessor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import javax.xml.bind.JAXBException;

public abstract interface AccessorFactory
{
  public abstract Accessor createFieldAccessor(Class paramClass, Field paramField, boolean paramBoolean)
    throws JAXBException;
  
  public abstract Accessor createPropertyAccessor(Class paramClass, Method paramMethod1, Method paramMethod2)
    throws JAXBException;
}

/* Location:
 * Qualified Name:     com.sun.xml.bind.AccessorFactory
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.xml.bind;

import com.sun.xml.bind.v2.runtime.reflect.Accessor;
import com.sun.xml.bind.v2.runtime.reflect.Accessor.FieldReflection;
import com.sun.xml.bind.v2.runtime.reflect.Accessor.GetterOnlyReflection;
import com.sun.xml.bind.v2.runtime.reflect.Accessor.GetterSetterReflection;
import com.sun.xml.bind.v2.runtime.reflect.Accessor.ReadOnlyFieldReflection;
import com.sun.xml.bind.v2.runtime.reflect.Accessor.SetterOnlyReflection;
import java.lang.reflect.Field;
import java.lang.reflect.Method;

public class AccessorFactoryImpl
  implements AccessorFactory
{
  private static AccessorFactoryImpl instance = new AccessorFactoryImpl();
  
  public static AccessorFactoryImpl getInstance()
  {
    return instance;
  }
  
  public Accessor createFieldAccessor(Class bean, Field field, boolean readOnly)
  {
    return readOnly ? new Accessor.ReadOnlyFieldReflection(field) : new Accessor.FieldReflection(field);
  }
  
  public Accessor createPropertyAccessor(Class bean, Method getter, Method setter)
  {
    if (getter == null) {
      return new Accessor.SetterOnlyReflection(setter);
    }
    if (setter == null) {
      return new Accessor.GetterOnlyReflection(getter);
    }
    return new Accessor.GetterSetterReflection(getter, setter);
  }
}

/* Location:
 * Qualified Name:     com.sun.xml.bind.AccessorFactoryImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.xml.bind;

import javax.xml.bind.annotation.adapters.XmlAdapter;

public final class AnyTypeAdapter
  extends XmlAdapter<Object, Object>
{
  public Object unmarshal(Object v)
  {
    return v;
  }
  
  public Object marshal(Object v)
  {
    return v;
  }
}

/* Location:
 * Qualified Name:     com.sun.xml.bind.AnyTypeAdapter
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.xml.bind;

import javax.xml.bind.Marshaller;

public abstract interface CycleRecoverable$Context
{
  public abstract Marshaller getMarshaller();
}

/* Location:
 * Qualified Name:     com.sun.xml.bind.CycleRecoverable.Context
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.xml.bind;

import javax.xml.bind.Marshaller;

public abstract interface CycleRecoverable
{
  public abstract Object onCycleDetected(Context paramContext);
  
  public static abstract interface Context
  {
    public abstract Marshaller getMarshaller();
  }
}

/* Location:
 * Qualified Name:     com.sun.xml.bind.CycleRecoverable
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.xml.bind;

import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;

final class DatatypeConverterImpl$CalendarFormatter
{
  public static String doFormat(String format, Calendar cal)
    throws IllegalArgumentException
  {
    int fidx = 0;
    int flen = format.length();
    StringBuilder buf = new StringBuilder();
    while (fidx < flen)
    {
      char fch = format.charAt(fidx++);
      if (fch != '%') {
        buf.append(fch);
      } else {
        switch (format.charAt(fidx++))
        {
        case 'Y': 
          formatYear(cal, buf);
          break;
        case 'M': 
          formatMonth(cal, buf);
          break;
        case 'D': 
          formatDays(cal, buf);
          break;
        case 'h': 
          formatHours(cal, buf);
          break;
        case 'm': 
          formatMinutes(cal, buf);
          break;
        case 's': 
          formatSeconds(cal, buf);
          break;
        case 'z': 
          formatTimeZone(cal, buf);
          break;
        default: 
          throw new InternalError();
        }
      }
    }
    return buf.toString();
  }
  
  private static void formatYear(Calendar cal, StringBuilder buf)
  {
    int year = cal.get(1);
    String s;
    String s;
    if (year <= 0) {
      s = Integer.toString(1 - year);
    } else {
      s = Integer.toString(year);
    }
    while (s.length() < 4) {
      s = '0' + s;
    }
    if (year <= 0) {
      s = '-' + s;
    }
    buf.append(s);
  }
  
  private static void formatMonth(Calendar cal, StringBuilder buf)
  {
    formatTwoDigits(cal.get(2) + 1, buf);
  }
  
  private static void formatDays(Calendar cal, StringBuilder buf)
  {
    formatTwoDigits(cal.get(5), buf);
  }
  
  private static void formatHours(Calendar cal, StringBuilder buf)
  {
    formatTwoDigits(cal.get(11), buf);
  }
  
  private static void formatMinutes(Calendar cal, StringBuilder buf)
  {
    formatTwoDigits(cal.get(12), buf);
  }
  
  private static void formatSeconds(Calendar cal, StringBuilder buf)
  {
    formatTwoDigits(cal.get(13), buf);
    if (cal.isSet(14))
    {
      int n = cal.get(14);
      if (n != 0)
      {
        String ms = Integer.toString(n);
        while (ms.length() < 3) {
          ms = '0' + ms;
        }
        buf.append('.');
        buf.append(ms);
      }
    }
  }
  
  private static void formatTimeZone(Calendar cal, StringBuilder buf)
  {
    TimeZone tz = cal.getTimeZone();
    if (tz == null) {
      return;
    }
    int offset = tz.getOffset(cal.getTime().getTime());
    if (offset == 0)
    {
      buf.append('Z');
      return;
    }
    if (offset >= 0)
    {
      buf.append('+');
    }
    else
    {
      buf.append('-');
      offset *= -1;
    }
    offset /= 60000;
    
    formatTwoDigits(offset / 60, buf);
    buf.append(':');
    formatTwoDigits(offset % 60, buf);
  }
  
  private static void formatTwoDigits(int n, StringBuilder buf)
  {
    if (n < 10) {
      buf.append('0');
    }
    buf.append(n);
  }
}

/* Location:
 * Qualified Name:     com.sun.xml.bind.DatatypeConverterImpl.CalendarFormatter
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.xml.bind;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.TimeZone;
import javax.xml.bind.DatatypeConverter;
import javax.xml.bind.DatatypeConverterInterface;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.NamespaceContext;
import javax.xml.namespace.QName;

public final class DatatypeConverterImpl
  implements DatatypeConverterInterface
{
  public static final DatatypeConverterInterface theInstance;
  private static final char[] hexCode;
  private static final byte[] decodeMap;
  private static final byte PADDING = 127;
  private static final char[] encodeMap;
  private static final DatatypeFactory datatypeFactory;
  
  public String parseString(String lexicalXSDString)
  {
    return lexicalXSDString;
  }
  
  public BigInteger parseInteger(String lexicalXSDInteger)
  {
    return _parseInteger(lexicalXSDInteger);
  }
  
  public static BigInteger _parseInteger(CharSequence s)
  {
    return new BigInteger(removeOptionalPlus(WhiteSpaceProcessor.trim(s)).toString());
  }
  
  public String printInteger(BigInteger val)
  {
    return _printInteger(val);
  }
  
  public static String _printInteger(BigInteger val)
  {
    return val.toString();
  }
  
  public int parseInt(String s)
  {
    return _parseInt(s);
  }
  
  public static int _parseInt(CharSequence s)
  {
    int len = s.length();
    int sign = 1;
    
    int r = 0;
    for (int i = 0; i < len; i++)
    {
      char ch = s.charAt(i);
      if (!WhiteSpaceProcessor.isWhiteSpace(ch)) {
        if (('0' <= ch) && (ch <= '9')) {
          r = r * 10 + (ch - '0');
        } else if (ch == '-') {
          sign = -1;
        } else if (ch != '+') {
          throw new NumberFormatException("Not a number: " + s);
        }
      }
    }
    return r * sign;
  }
  
  public long parseLong(String lexica
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd