本文整理了Java中org.neo4j.kernel.internal.Version.getVersion()
方法的一些代码示例,展示了Version.getVersion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.getVersion()
方法的具体详情如下:
包路径:org.neo4j.kernel.internal.Version
类名称:Version
方法名:getVersion
暂无
代码示例来源:origin: neo4j/neo4j
public static String getKernelVersion()
{
return getKernel().getVersion();
}
代码示例来源:origin: neo4j/neo4j
/**
* A very nice to have main-method for quickly checking the version of a neo4j kernel,
* for example given a kernel jar file.
*/
public static void main( String[] args )
{
Version kernelVersion = getKernel();
System.out.println( kernelVersion );
System.out.println( "Title: " + kernelVersion.title );
System.out.println( "Vendor: " + kernelVersion.vendor );
System.out.println( "ArtifactId: " + kernelVersion.artifactId );
System.out.println( "Version: " + kernelVersion.getVersion() );
}
代码示例来源:origin: neo4j/neo4j
@Override
public String toString()
{
StringBuilder result = new StringBuilder();
if ( title != null )
{
result.append( title );
if ( artifactId == null || !artifactId.equals( title ) )
{
result.append( " (" ).append( artifactId ).append( ')' );
}
}
else if ( artifactId != null )
{
result.append( artifactId );
}
else
{
result.append( "Unknown Component" );
}
result.append( ", " );
if ( title == null )
{
result.append( "unpackaged " );
}
result.append( "version: " ).append( getVersion() );
return result.toString();
}
代码示例来源:origin: neo4j/neo4j
@Test
public void shouldExposeCleanAndDetailedVersions()
{
assertThat( version( "1.2.3-M01,abcdef012345" ).getReleaseVersion(), equalTo( "1.2.3-M01" ));
assertThat( version( "1.2.3-M01,abcdef012345" ).getVersion(), equalTo( "1.2.3-M01,abcdef012345" ));
assertThat( version( "1.2.3-M01,abcdef012345-dirty" ).getVersion(), equalTo( "1.2.3-M01,abcdef012345-dirty" ));
assertThat( version( "1.2.3,abcdef012345" ).getReleaseVersion(), equalTo( "1.2.3" ));
assertThat( version( "1.2.3,abcdef012345" ).getVersion(), equalTo( "1.2.3,abcdef012345" ));
assertThat( version( "1.2.3,abcdef012345-dirty" ).getVersion(), equalTo( "1.2.3,abcdef012345-dirty" ));
assertThat( version( "1.2.3-GA,abcdef012345" ).getReleaseVersion(), equalTo( "1.2.3-GA" ));
assertThat( version( "1.2.3-GA,abcdef012345" ).getVersion(), equalTo( "1.2.3-GA,abcdef012345" ));
assertThat( version( "1.2.3-GA,abcdef012345-dirty" ).getVersion(), equalTo( "1.2.3-GA,abcdef012345-dirty" ));
assertThat( version( "1.2.3M01,abcdef012345" ).getReleaseVersion(), equalTo( "1.2.3M01" ));
assertThat( version( "1.2.3M01,abcdef012345" ).getVersion(), equalTo( "1.2.3M01,abcdef012345" ));
assertThat( version( "1.2.3M01,abcdef012345-dirty" ).getVersion(), equalTo( "1.2.3M01,abcdef012345-dirty" ));
assertThat( version( "1.2" ).getReleaseVersion(), equalTo( "1.2" ));
assertThat( version( "1.2" ).getVersion(), equalTo( "1.2" ));
assertThat( version( "0" ).getReleaseVersion(), equalTo( "0" ));
assertThat( version( "0" ).getVersion(), equalTo( "0" ));
}
代码示例来源:origin: org.neo4j/neo4j-kernel
/**
* A very nice to have main-method for quickly checking the version of a neo4j kernel,
* for example given a kernel jar file.
*/
public static void main( String[] args )
{
Version kernelVersion = getKernel();
System.out.println( kernelVersion );
System.out.println( "Title: " + kernelVersion.title );
System.out.println( "Vendor: " + kernelVersion.vendor );
System.out.println( "ArtifactId: " + kernelVersion.artifactId );
System.out.println( "Version: " + kernelVersion.getVersion() );
}
代码示例来源:origin: org.neo4j/neo4j-kernel
public static String getKernelVersion()
{
return getKernel().getVersion();
}
代码示例来源:origin: org.neo4j/neo4j-kernel
@Override
public String toString()
{
StringBuilder result = new StringBuilder();
if ( title != null )
{
result.append( title );
if ( artifactId == null || !artifactId.equals( title ) )
{
result.append( " (" ).append( artifactId ).append( ')' );
}
}
else if ( artifactId != null )
{
result.append( artifactId );
}
else
{
result.append( "Unknown Component" );
}
result.append( ", " );
if ( title == null )
{
result.append( "unpackaged " );
}
result.append( "version: " ).append( getVersion() );
return result.toString();
}
内容来源于网络,如有侵权,请联系作者删除!