org.codehaus.modello.model.Model.getDefaultPackageName()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(7.9k)|赞(0)|评价(0)|浏览(176)

本文整理了Java中org.codehaus.modello.model.Model.getDefaultPackageName()方法的一些代码示例,展示了Model.getDefaultPackageName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.getDefaultPackageName()方法的具体详情如下:
包路径:org.codehaus.modello.model.Model
类名称:Model
方法名:getDefaultPackageName

Model.getDefaultPackageName介绍

暂无

代码示例

代码示例来源:origin: org.codehaus.modello/modello-core

/**
 * @deprecated This shouldn't be used, anything querying the model should read the
 *             package of the class. Use getDefaultPackageName(..).
 */
public String getPackageName( boolean withVersion, Version version )
{
  return getDefaultPackageName( withVersion, version );
}

代码示例来源:origin: org.codehaus.modello/modello-core

public void initialize( Model model )
  {
    this.model = model;

    if ( packageName == null )
    {
      packageName = model.getDefaultPackageName( false, null );
    }
  }
}

代码示例来源:origin: org.codehaus.modello/modello-plugin-store

private static String getGeneratedPackage( Model model, Version version )
{
  return model.getDefaultPackageName( false, version );
}

代码示例来源:origin: org.apache.archiva.redback.components.modello/modello-plugin-store

private static String getGeneratedPackage( Model model, Version version )
{
  return model.getDefaultPackageName( false, version );
}

代码示例来源:origin: org.codehaus.modello/modello-plugin-jpox

if ( packageName.equals( model.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() ) ) )

代码示例来源:origin: org.codehaus.modello/modello-plugin-store

context.put( "package", model.getDefaultPackageName( false, getGeneratedVersion() ) );
String packageName = model.getDefaultPackageName( false, getGeneratedVersion() );

代码示例来源:origin: org.apache.archiva.redback.components.modello/modello-plugin-store

context.put( "package", model.getDefaultPackageName( false, getGeneratedVersion() ) );
String packageName = model.getDefaultPackageName( false, getGeneratedVersion() );

代码示例来源:origin: org.codehaus.modello/modello-plugin-jpox

String packageName = model.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() );
String dir = StringUtils.replace( packageName, '.', '/' );
File directory = new File( getOutputDirectory(), dir );

代码示例来源:origin: org.apache.archiva.redback.components.modello/modello-plugin-jpox

String packageName = model.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() );
String dir = StringUtils.replace( packageName, '.', '/' );
File directory = new File( getOutputDirectory(), dir );

代码示例来源:origin: org.codehaus.modello/modello-plugin-plexus-registry

protected void generate( Model model, Properties parameters, String outputType )
    throws ModelloException
  {
    initialize( model, parameters );

    // Initialize the Velocity context

    String packageName;
    if ( isPackageWithVersion() )
    {
      packageName = model.getDefaultPackageName( true, getGeneratedVersion() );
    }
    else
    {
      packageName = model.getDefaultPackageName( false, null );
    }

    packageName += ".io.registry";

    Context context = makeStubVelocityContext( model, getGeneratedVersion(), packageName );

    // Generate the reader
    String className = model.getName() + outputType;

    writeClass( "org/codehaus/modello/plugin/registry/" + outputType + ".java.vm", getOutputDirectory(),
          packageName, className, context );
  }
}

代码示例来源:origin: org.codehaus.modello/modello-plugin-prevayler

context.put( "package", model.getDefaultPackageName( false, getGeneratedVersion() ) );
String packageName = model.getDefaultPackageName( isPackageWithVersion(), super.getGeneratedVersion() );

代码示例来源:origin: org.codehaus.modello/modello-plugin-jpox

public void generate( Model model, Properties parameters )
    throws ModelloException
  {
    initialize( model, parameters );

    // Initialize the Velocity context

    Context context = makeStubVelocityContext( model, getGeneratedVersion() );

    context.put( "storeClassMetadataId", StoreClassMetadata.ID );

    context.put( "storeFieldMetadataId", StoreFieldMetadata.ID );

    // Generate a ModelloMetadata class for storing model information in the database
    String packageName = model.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() );

    String className = model.getName() + "ModelloMetadata";
    writeClass( "org/codehaus/modello/plugin/jpox/templates/ModelloMetadata.java.vm", getOutputDirectory(),
          packageName, className, context );
  }
}

代码示例来源:origin: org.apache.archiva.redback.components.modello/modello-plugin-jpox

public void generate( Model model, Properties parameters )
    throws ModelloException
  {
    initialize( model, parameters );

    // Initialize the Velocity context

    Context context = makeStubVelocityContext( model, getGeneratedVersion() );

    context.put( "storeClassMetadataId", StoreClassMetadata.ID );

    context.put( "storeFieldMetadataId", StoreFieldMetadata.ID );

    // Generate a ModelloMetadata class for storing model information in the database
    String packageName = model.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() );

    String className = model.getName() + "ModelloMetadata";
    writeClass( "org/apache/archiva/redback/components/modello/jpox/templates/ModelloMetadata.java.vm", getOutputDirectory(),
          packageName, className, context );
  }
}

代码示例来源:origin: org.codehaus.modello/modello-plugin-jpox

public void generate( Model model, Properties parameters )
    throws ModelloException
  {
    initialize( model, parameters );

    // Initialize the Velocity context

    Context context = makeStubVelocityContext( model, getGeneratedVersion() );

    context.put( "storeClassMetadataId", StoreClassMetadata.ID );

    context.put( "storeFieldMetadataId", StoreFieldMetadata.ID );

    // Generate a ModelloMetadata class for storing model information in the database
    String packageName = model.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() );

    // Generate the JPoxStore
    String className = model.getName() + "JPoxStore";

    writeClass( "org/codehaus/modello/plugin/jpox/templates/JPoxStore.java.vm", getOutputDirectory(), packageName,
          className, context );
  }
}

代码示例来源:origin: org.apache.archiva.redback.components.modello/modello-plugin-jpox

public void generate( Model model, Properties parameters )
    throws ModelloException
  {
    initialize( model, parameters );

    // Initialize the Velocity context

    Context context = makeStubVelocityContext( model, getGeneratedVersion() );

    context.put( "storeClassMetadataId", StoreClassMetadata.ID );

    context.put( "storeFieldMetadataId", StoreFieldMetadata.ID );

    // Generate a ModelloMetadata class for storing model information in the database
    String packageName = model.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() );

    // Generate the JPoxStore
    String className = model.getName() + "JPoxStore";

    writeClass( "org/apache/archiva/redback/components/modello/jpox/templates/JPoxStore.java.vm", getOutputDirectory(), packageName,
          className, context );
  }
}

代码示例来源:origin: org.codehaus.modello/modello-plugin-converters

String basePackage = objectModel.getDefaultPackageName( false, null );
String packageName = basePackage + ".convert";

代码示例来源:origin: org.codehaus.modello/modello-plugin-converters

String rootClassName = rootClass.getName();
String targetPackage = objectModel.getDefaultPackageName( v != null, v );
String targetClass = targetPackage + "." + rootClassName;
for ( Version sourceVersion : allVersions )
  String sourcePackage = objectModel.getDefaultPackageName( true, sourceVersion );
  String sourceClass = sourcePackage + "." + rootClassName;
  sc.add( prefix + "if ( value instanceof " + sourceClass + " )" );
    String p = objectModel.getDefaultPackageName( true, targetVersion );
    String c = p + "." + rootClassName;
    sc.add( "value = new " + p + ".convert.BasicVersionConverter().convert" + rootClassName

代码示例来源:origin: org.codehaus.modello/modello-plugin-stax

String packageName = objectModel.getDefaultPackageName( false, null ) + ".io.stax";
  sc.addIndented( "return new " + getModel().getDefaultPackageName( true, new Version( version ) )
          + ".io.stax." + getFileName( "StaxReader" ) + "().read( reader, strict );" );
  sc.add( "}" );

代码示例来源:origin: org.codehaus.modello/modello-plugin-jackson

objectModel.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() ) + ".io.jackson";

代码示例来源:origin: org.codehaus.modello/modello-plugin-jackson

String packageName = objectModel.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() )
  + ".io.jackson";

相关文章