public ElementKey<?, ?> adapt(String kind) { return delegate().adapt(kind); }
public ElementKey<?, ?> adapt(String kind) { return delegate().adapt(kind); }
public ElementKey<?, ?> adapt(String kind) { return delegate().adapt(kind); }
/** * Adapts an element based on a key. This will find an adaptation in the * metadata and adapt to that metadata type (and element type). If no * adaptation is found this will return the source element. * * @param source the element we are narrowing from. * @param sourceMeta the source metadata to adapt from. * @param kind the kind name to lookup the adaptation for. * @return the adapted element if one was found. */ protected Element adapt(Element source, ElementMetadata<?, ?> sourceMeta, String kind) { ElementKey<?, ?> adaptorKey = sourceMeta.adapt(kind); if (adaptorKey != null) { try { return adapt(adaptorKey, source); } catch (ContentCreationException e) { // Not usable as a adaptable kind, skip. LOGGER.log(Level.SEVERE, "Unable to adapt " + source.getClass() + " to " + adaptorKey.getElementType(), e); } } return source; }
/** * Adapts an element based on a key. This will find an adaptation in the * metadata and adapt to that metadata type (and element type). If no * adaptation is found this will return the source element. * * @param source the element we are narrowing from. * @param sourceMeta the source metadata to adapt from. * @param kind the kind name to lookup the adaptation for. * @return the adapted element if one was found. */ protected Element adapt(Element source, ElementMetadata<?, ?> sourceMeta, String kind) { ElementKey<?, ?> adaptorKey = sourceMeta.adapt(kind); if (adaptorKey != null) { try { return adapt(adaptorKey, source); } catch (ContentCreationException e) { // Not usable as a adaptable kind, skip. LOGGER.log(Level.SEVERE, "Unable to adapt " + source.getClass() + " to " + adaptorKey.getElementType(), e); } } return source; }
/** * Adapts an element based on a key. This will find an adaptation in the * metadata and adapt to that metadata type (and element type). If no * adaptation is found this will return the source element. * * @param source the element we are narrowing from. * @param sourceMeta the source metadata to adapt from. * @param kind the kind name to lookup the adaptation for. * @return the adapted element if one was found. */ protected Element adapt(Element source, ElementMetadata<?, ?> sourceMeta, String kind) { ElementKey<?, ?> adaptorKey = sourceMeta.adapt(kind); if (adaptorKey != null) { try { return adapt(adaptorKey, source); } catch (ContentCreationException e) { // Not usable as a adaptable kind, skip. LOGGER.log(Level.SEVERE, "Unable to adapt " + source.getClass() + " to " + adaptorKey.getElementType(), e); } } return source; }