List of usage examples for javax.xml.bind.annotation.adapters XmlAdapter getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:org.javelin.sws.ext.bind.SweJaxbMarshaller.java
@Override @SuppressWarnings("rawtypes") public void setAdapter(XmlAdapter adapter) { throw new UnsupportedOperationException( "What class do you want to set this adapter for? Probably not for " + adapter.getClass() + "..."); }
From source file:net.firejack.platform.core.utils.Factory.java
public void addAdapter(XmlAdapter adapter) { Class<? extends XmlAdapter> adapterClass = adapter.getClass(); Type[] typeArguments = ((ParameterizedTypeImpl) adapterClass.getGenericSuperclass()) .getActualTypeArguments();/*from w ww .j a v a 2 s. c om*/ String marshal = ((Class) typeArguments[0]).getName() + ((Class) typeArguments[1]).getName(); String unmarshal = ((Class) typeArguments[1]).getName() + ((Class) typeArguments[0]).getName(); adapters.put(marshal, adapter); adapters.put(unmarshal, adapter); }