public static CCustomizations getCustomizations(final CClassInfo classInfo) { return classInfo.getCustomizations(); }
public static CCustomizations getCustomizations(final CClassInfo classInfo) { return classInfo.getCustomizations(); }
public static CCustomizations getCustomizations(final CClassInfo classInfo) { return classInfo.getCustomizations(); }
/** * Propagate xsd complex type annotations on a class type. * * @param co the class outline */ protected void annotateClass(final ClassOutline co) { CPluginCustomization c = co.target.getCustomizations().find( CobolMarkup.NS, CobolMarkup.COMPLEX_TYPE); if (c == null) { return; // no customization --- nothing to inject here } c.markAsAcknowledged(); JAnnotationUse ce = co.implClass.annotate(CobolComplexType.class); ce.param(CobolMarkup.JAVA_CLASS_NAME, c.element.getAttribute(CobolMarkup.JAVA_CLASS_NAME)); }
@Override public boolean run( final Outline model, final Options opt, final ErrorHandler errorHandler ) throws SAXException { try { preCustomise( model, opt, errorHandler ); for( ClassOutline co : model.getClasses() ) { CPluginCustomization c = co.target.getCustomizations().find( getNameSpace(), getLocalName() ); if( c != null ) { customise( model, opt, errorHandler, co, c ); } } postCustomise( model, opt, errorHandler ); } catch( SAXException ex ) { Logger.getAnonymousLogger().severe( ex.getMessage()); throw ex; } return true; }
public boolean run(Outline model, Options opt, ErrorHandler errorHandler) { for( ClassOutline co : model.getClasses() ) { CPluginCustomization c = co.target.getCustomizations().find(Const.NS,"code"); if(c==null) continue; // no customization --- nothing to inject here c.markAsAcknowledged(); // TODO: ideally you should validate this DOM element to make sure // that there's no typo/etc. JAXP 1.3 can do this very easily. String codeFragment = DOMUtils.getElementText(c.element); // inject the specified code fragment into the implementation class. co.implClass.direct(codeFragment); } return true; } }
public boolean run(Outline model, Options opt, ErrorHandler errorHandler) { for( ClassOutline co : model.getClasses() ) { CPluginCustomization c = co.target.getCustomizations().find(Const.NS,"code"); if(c==null) continue; // no customization --- nothing to inject here c.markAsAcknowledged(); // TODO: ideally you should validate this DOM element to make sure // that there's no typo/etc. JAXP 1.3 can do this very easily. String codeFragment = DOMUtils.getElementText(c.element); // inject the specified code fragment into the implementation class. co.implClass.direct(codeFragment); } return true; } }
@Override public boolean run(Outline outline, Options opt, ErrorHandler errorHandler) { for (final ClassOutline classOutline : outline.getClasses()) { for (final CPluginCustomization pluginCustomization : classOutline.target .getCustomizations()) { pluginCustomization.markAsAcknowledged(); } final CClassInfo classInfo = classOutline.target; logger.debug("Class:" + classInfo.getName()); for (final FieldOutline fieldOutline : classOutline .getDeclaredFields()) { final CPropertyInfo propertyInfo = fieldOutline .getPropertyInfo(); logger.debug("Property:" + propertyInfo.getName(true)); for (final CPluginCustomization pluginCustomization : fieldOutline .getPropertyInfo().getCustomizations()) { pluginCustomization.markAsAcknowledged(); } } } return true; }
@Override public boolean run(Outline outline, Options opt, ErrorHandler errorHandler) { for (final ClassOutline classOutline : outline.getClasses()) { for (final CPluginCustomization pluginCustomization : classOutline.target .getCustomizations()) { pluginCustomization.markAsAcknowledged(); } final CClassInfo classInfo = classOutline.target; logger.debug("Class:" + classInfo.getName()); for (final FieldOutline fieldOutline : classOutline .getDeclaredFields()) { final CPropertyInfo propertyInfo = fieldOutline .getPropertyInfo(); logger.debug("Property:" + propertyInfo.getName(true)); for (final CPluginCustomization pluginCustomization : fieldOutline .getPropertyInfo().getCustomizations()) { pluginCustomization.markAsAcknowledged(); } } } return true; }