当前位置: 首页>>代码示例>>Java>>正文


Java Activation.getOs方法代码示例

本文整理汇总了Java中org.apache.maven.model.Activation.getOs方法的典型用法代码示例。如果您正苦于以下问题:Java Activation.getOs方法的具体用法?Java Activation.getOs怎么用?Java Activation.getOs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.maven.model.Activation的用法示例。


在下文中一共展示了Activation.getOs方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeActivation

import org.apache.maven.model.Activation; //导入方法依赖的package包/类
private void writeActivation(Activation activation, String tagName, XmlSerializer serializer)
        throws java.io.IOException {
    serializer.startTag(NAMESPACE, tagName);
    flush(serializer);
    StringBuffer b = b(serializer);
    int start = b.length();
    if (activation.isActiveByDefault() != false) {
        writeValue(serializer, "activeByDefault", String.valueOf(activation.isActiveByDefault()), activation);
    }
    if (activation.getJdk() != null) {
        writeValue(serializer, "jdk", activation.getJdk(), activation);
    }
    if (activation.getOs() != null) {
        writeActivationOS((ActivationOS) activation.getOs(), "os", serializer);
    }
    if (activation.getProperty() != null) {
        writeActivationProperty((ActivationProperty) activation.getProperty(), "property", serializer);
    }
    if (activation.getFile() != null) {
        writeActivationFile((ActivationFile) activation.getFile(), "file", serializer);
    }
    serializer.endTag(NAMESPACE, tagName).flush();
    logLocation(activation, "", start, b.length());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:LocationAwareMavenXpp3Writer.java

示例2: visitProfileActivation

import org.apache.maven.model.Activation; //导入方法依赖的package包/类
private void visitProfileActivation( ModelVisitor visitor, Activation activation )
{
    ActivationOS os = activation.getOs();
    if ( os != null )
    {
        visitor.visitProfileActivationO( os );
        os = visitor.replaceProfileActivationO( os );
        activation.setOs( os );
    }

    ActivationProperty property = activation.getProperty();
    if ( property != null )
    {
        visitor.visitProfileActivationProperty( property );
        property = visitor.replaceProfileActivationProperty( property );
        activation.setProperty( property );
    }

    ActivationFile file = activation.getFile();
    if ( file != null )
    {
        visitor.visitProfileActivationFile( file );
        file = visitor.replaceProfileActivationFile( file );
        activation.setFile( file );
    }
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:27,代码来源:DefaultModelProcessor.java

示例3: isActive

import org.apache.maven.model.Activation; //导入方法依赖的package包/类
public boolean isActive( Profile profile )
{
    Activation activation = profile.getActivation();
    ActivationOS os = activation.getOs();

    boolean result = ensureAtLeastOneNonNull( os );

    if ( result && os.getFamily() != null )
    {
        result = determineFamilyMatch( os.getFamily() );
    }
    if ( result && os.getName() != null )
    {
        result = determineNameMatch( os.getName() );
    }
    if ( result && os.getArch() != null )
    {
        result = determineArchMatch( os.getArch() );
    }
    if ( result && os.getVersion() != null )
    {
        result = determineVersionMatch( os.getVersion() );
    }
    return result;
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:26,代码来源:OperatingSystemProfileActivator.java

示例4: isBuildTimeDriven

import org.apache.maven.model.Activation; //导入方法依赖的package包/类
/**
 * @param activation is the {@link Activation} of a {@link Profile}.
 * @return <code>true</code> if the given {@link Activation} is build-time driven, <code>false</code> otherwise (if
 *         it is triggered by OS or JDK).
 */
protected static boolean isBuildTimeDriven( Activation activation )
{

    if ( activation == null )
    {
        return true;
    }
    if ( StringUtils.isEmpty( activation.getJdk() ) && activation.getOs() == null )
    {
        return true;
    }
    return false;
}
 
开发者ID:mojohaus,项目名称:flatten-maven-plugin,代码行数:19,代码来源:FlattenMojo.java

示例5: isActive

import org.apache.maven.model.Activation; //导入方法依赖的package包/类
public boolean isActive( Profile profile, ProfileActivationContext context, ModelProblemCollector problems )
{
    Activation activation = profile.getActivation();

    if ( activation == null )
    {
        return false;
    }

    ActivationOS os = activation.getOs();

    if ( os == null )
    {
        return false;
    }

    boolean active = ensureAtLeastOneNonNull( os );

    if ( active && os.getFamily() != null )
    {
        active = determineFamilyMatch( os.getFamily() );
    }
    if ( active && os.getName() != null )
    {
        active = determineNameMatch( os.getName() );
    }
    if ( active && os.getArch() != null )
    {
        active = determineArchMatch( os.getArch() );
    }
    if ( active && os.getVersion() != null )
    {
        active = determineVersionMatch( os.getVersion() );
    }

    return active;
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:38,代码来源:OperatingSystemProfileActivator.java

示例6: canDetermineActivation

import org.apache.maven.model.Activation; //导入方法依赖的package包/类
public boolean canDetermineActivation( Profile profile )
{
    Activation activation = profile.getActivation();
    return activation != null && activation.getOs() != null;
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:6,代码来源:OperatingSystemProfileActivator.java


注:本文中的org.apache.maven.model.Activation.getOs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。