本文整理汇总了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());
}
示例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 );
}
}
示例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;
}
示例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;
}
示例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;
}
示例6: canDetermineActivation
import org.apache.maven.model.Activation; //导入方法依赖的package包/类
public boolean canDetermineActivation( Profile profile )
{
Activation activation = profile.getActivation();
return activation != null && activation.getOs() != null;
}