/** Retrieves the manifest for the specified class. */ protected ExtensionManifest getManifest(ExtensionProfile extProfile, Class<? extends ExtensionPoint> extendedClass) { if (manifest == null) { manifest = extProfile.getManifest(extendedClass); } return manifest; }
/** Retrieves the manifest for the specified class. */ protected ExtensionManifest getManifest(ExtensionProfile extProfile, Class<? extends ExtensionPoint> extendedClass) { if (manifest == null) { manifest = extProfile.getManifest(extendedClass); } return manifest; }
/** Retrieves the manifest for the specified class. */ protected ExtensionManifest getManifest(ExtensionProfile extProfile, Class<? extends ExtensionPoint> extendedClass) { if (manifest == null) { manifest = extProfile.getManifest(extendedClass); } return manifest; }
/** * Constructs a new Handler instance that process extensions on a class * associated with the ExtensionPoint, and consumes the attributes. * * @param profile The extension profile associatd with the Handler. * @param extendedClass The extended class within the profile for this * handler * @param attrs XML attributes or <code>null</code> to suppress the use of * {@link AttributeHelper} */ public ExtensionHandler(ExtensionProfile profile, Class<? extends ExtensionPoint> extendedClass, Attributes attrs) { super(attrs); this.extProfile = profile; this.extendedClass = extendedClass; this.extManifest = profile.getManifest(extendedClass); if (this.extManifest != null) { hasExtensions = true; } initializeArbitraryXml(extProfile, extendedClass, this); }
/** * Constructs a new Handler instance that process extensions on a class * associated with the ExtensionPoint, and consumes the attributes. * * @param profile The extension profile associatd with the Handler. * @param extendedClass The extended class within the profile for this * handler * @param attrs XML attributes or <code>null</code> to suppress the use of * {@link AttributeHelper} */ public ExtensionHandler(ExtensionProfile profile, Class<? extends ExtensionPoint> extendedClass, Attributes attrs) { super(attrs); this.extProfile = profile; this.extendedClass = extendedClass; this.extManifest = profile.getManifest(extendedClass); if (this.extManifest != null) { hasExtensions = true; } initializeArbitraryXml(extProfile, extendedClass, this); }
/** * Constructs a new Handler instance that process extensions on a class * associated with the ExtensionPoint, and consumes the attributes. * * @param profile The extension profile associatd with the Handler. * @param extendedClass The extended class within the profile for this * handler * @param attrs XML attributes or <code>null</code> to suppress the use of * {@link AttributeHelper} */ public ExtensionHandler(ExtensionProfile profile, Class<? extends ExtensionPoint> extendedClass, Attributes attrs) { super(attrs); this.extProfile = profile; this.extendedClass = extendedClass; this.extManifest = profile.getManifest(extendedClass); if (this.extManifest != null) { hasExtensions = true; } initializeArbitraryXml(extProfile, extendedClass, this); }
ExtensionManifest manifest = getManifest(extendedType); if (manifest != null && manifest.extendedType == extendedType) { return manifest; while (manifest != null) { superManifests.push(manifest); manifest = getManifest(manifest.extendedType.getSuperclass());
ExtensionManifest manifest = getManifest(extendedType); if (manifest != null && manifest.extendedType == extendedType) { return manifest; while (manifest != null) { superManifests.push(manifest); manifest = getManifest(manifest.extendedType.getSuperclass());
ExtensionManifest manifest = getManifest(extendedType); if (manifest != null && manifest.extendedType == extendedType) { return manifest; while (manifest != null) { superManifests.push(manifest); manifest = getManifest(manifest.extendedType.getSuperclass());
@Override protected void generate(XmlWriter w, ExtensionProfile p, XmlNamespace namespace, String localName, List<XmlWriter.Attribute> attrs, AttributeGenerator generator) throws IOException { // validate if (generator.getContent() != null) { throw new IllegalStateException( "No content allowed on an extension point"); } try { ExtensionManifest profManifest = p.getManifest(this.getClass()); if (profManifest != null) { checkRequiredExtensions(profManifest); } } catch (ParseException e) { throw new IllegalStateException(e.getMessage()); } // generate XML generateStartElement(w, namespace, localName, attrs, null); generateExtensions(w, p); w.endElement(namespace, localName); }
@Override protected void generate(XmlWriter w, ExtensionProfile p, XmlNamespace namespace, String localName, List<XmlWriter.Attribute> attrs, AttributeGenerator generator) throws IOException { // validate if (generator.getContent() != null) { throw new IllegalStateException( "No content allowed on an extension point"); } try { ExtensionManifest profManifest = p.getManifest(this.getClass()); if (profManifest != null) { checkRequiredExtensions(profManifest); } } catch (ParseException e) { throw new IllegalStateException(e.getMessage()); } // generate XML generateStartElement(w, namespace, localName, attrs, null); generateExtensions(w, p); w.endElement(namespace, localName); }
@Override protected void generate(XmlWriter w, ExtensionProfile p, XmlNamespace namespace, String localName, List<XmlWriter.Attribute> attrs, AttributeGenerator generator) throws IOException { // validate if (generator.getContent() != null) { throw new IllegalStateException( "No content allowed on an extension point"); } try { ExtensionManifest profManifest = p.getManifest(this.getClass()); if (profManifest != null) { checkRequiredExtensions(profManifest); } } catch (ParseException e) { throw new IllegalStateException(e.getMessage()); } // generate XML generateStartElement(w, namespace, localName, attrs, null); generateExtensions(w, p); w.endElement(namespace, localName); }