本文整理了Java中org.codehaus.modello.model.Model.getDefault()
方法的一些代码示例,展示了Model.getDefault()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.getDefault()
方法的具体详情如下:
包路径:org.codehaus.modello.model.Model
类名称:Model
方法名:getDefault
暂无
代码示例来源:origin: org.codehaus.modello/modello-core
public String getDefaultPackageName( boolean withVersion, Version version )
{
String packageName = getDefault( ModelDefault.PACKAGE ).getValue();
if ( withVersion )
{
packageName += "." + version.toString( "v", "_" );
}
return packageName;
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-xml
protected void initialize( Model model, Properties parameters )
throws ModelloException
{
super.initialize( model, parameters );
strictXmlAttributes = model.getDefault( ModelDefault.STRICT_XML_ATTRIBUTES ).getBoolean();
}
代码示例来源:origin: org.codehaus.modello/modello-core
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;
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-java
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;
}
代码示例来源:origin: org.codehaus.modello/modello-core
ModelDefault modelDefault = getModelClass().getModel().getDefault( ModelDefault.LIST );
ModelDefault modelDefault = getModelClass().getModel().getDefault( getType() );
代码示例来源:origin: org.codehaus.modello/modello-core
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." );
}
}
}
内容来源于网络,如有侵权,请联系作者删除!