public String getDefaultPackageName( boolean withVersion, Version version ) { String packageName = getDefault( ModelDefault.PACKAGE ).getValue(); if ( withVersion ) { packageName += "." + version.toString( "v", "_" ); } return packageName; }
protected void initialize( Model model, Properties parameters ) throws ModelloException { super.initialize( model, parameters ); strictXmlAttributes = model.getDefault( ModelDefault.STRICT_XML_ATTRIBUTES ).getBoolean(); }
public String getPackageName( boolean withVersion, Version version ) { String p; if ( packageName != null ) { p = packageName; } else { try { p = model.getDefault( ModelDefault.PACKAGE ).getValue(); } catch ( Exception e ) { p = ModelDefault.PACKAGE_VALUE; } } if ( withVersion ) { p += "." + version.toString( "v", "_" ); } return p; }
private String getDefaultValue( ModelAssociation modelAssociation, JType componentType ) { String defaultValue = getDefaultValue( modelAssociation ); if ( modelAssociation.isGenericType() ) { ModelDefault modelDefault = getModel().getDefault( modelAssociation.getType() ); if ( useJava5 ) { defaultValue = StringUtils.replace( modelDefault.getValue(), "<?>", "<" + componentType.getName() + ">" ); } else { defaultValue = StringUtils.replace( modelDefault.getValue(), "<?>", "/*<" + componentType.getName() + ">*/" ); } } return defaultValue; }
ModelDefault modelDefault = getModelClass().getModel().getDefault( ModelDefault.LIST ); ModelDefault modelDefault = getModelClass().getModel().getDefault( getType() );
public void validateElement() throws ModelValidationException { // Check if superClass exists if ( hasSuperClass() ) { try { getModel().getClass( superClass, getVersionRange() ); isInternalSuperClass = true; } catch ( ModelloRuntimeException e ) { isInternalSuperClass = false; } } if ( getModel().getDefault( ModelDefault.CHECK_DEPRECATION ).getBoolean() ) { if ( ! Version.INFINITE.equals( getVersionRange().getToVersion() ) && getDeprecatedVersion() == null ) { throw new ModelValidationException( "You must define the deprecated version of '" + getName() + "' class." ); } } }