本文整理了Java中org.apache.polygene.api.structure.Module.name()
方法的一些代码示例,展示了Module.name()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Module.name()
方法的具体详情如下:
包路径:org.apache.polygene.api.structure.Module
类名称:Module
方法名:name
暂无
代码示例来源:origin: apache/attic-polygene-java
public String name()
{
return module.name();
}
}
代码示例来源:origin: apache/attic-polygene-java
@Override
public String hello()
{
module.name();
return "Hello Polygene!";
}
}
代码示例来源:origin: apache/attic-polygene-java
/**
* Build a Metric name for the given Module, Method and optional fragments.
*
* @param module Module
* @param method Method
* @param fragments Name fragments
* @return Metric name
*/
public static String nameFor( Module module, Method method, String... fragments )
{
StringJoiner joiner = new StringJoiner( "." )
.add( module.layer().name() )
.add( module.name() )
.add( className( method.getDeclaringClass() ) )
.add( method.getName() );
for( String fragment : fragments )
{
joiner.add( fragment );
}
return joiner.toString();
}
代码示例来源:origin: org.apache.polygene.core/org.apache.polygene.core.api
/**
* Build a Metric name for the given Module, Method and optional fragments.
*
* @param module Module
* @param method Method
* @param fragments Name fragments
* @return Metric name
*/
public static String nameFor( Module module, Method method, String... fragments )
{
StringJoiner joiner = new StringJoiner( "." )
.add( module.layer().name() )
.add( module.name() )
.add( className( method.getDeclaringClass() ) )
.add( method.getName() );
for( String fragment : fragments )
{
joiner.add( fragment );
}
return joiner.toString();
}
代码示例来源:origin: apache/attic-polygene-java
/**
* Build a Metric name for the given Module, Type and optional fragments.
*
* @param module Module
* @param type Type
* @param fragments Name fragments
* @return Metric name
*/
public static String nameFor( Module module, Class<?> type, String... fragments )
{
StringJoiner joiner = new StringJoiner( "." )
.add( module.layer().name() )
.add( module.name() )
.add( className( type ) );
for( String fragment : fragments )
{
joiner.add( fragment );
}
return joiner.toString();
}
代码示例来源:origin: org.apache.polygene.core/org.apache.polygene.core.api
/**
* Build a Metric name for the given Module, Type and optional fragments.
*
* @param module Module
* @param type Type
* @param fragments Name fragments
* @return Metric name
*/
public static String nameFor( Module module, Class<?> type, String... fragments )
{
StringJoiner joiner = new StringJoiner( "." )
.add( module.layer().name() )
.add( module.name() )
.add( className( type ) );
for( String fragment : fragments )
{
joiner.add( fragment );
}
return joiner.toString();
}
代码示例来源:origin: apache/attic-polygene-java
@Test
public void givenFixture1WhenGetNameThenConfiguredNameIsReturned()
throws AssemblyException
{
Application app = givenFixture1();
Module module = app.findModule( "Layer 1", "Module 1" ).newTransient( TestComposite1.class ).getModule();
assertThat( "module name is correct", module.name(), equalTo( "Module 1" ) );
}
代码示例来源:origin: apache/attic-polygene-java
public String hello( @MaxLength( 5 ) String name )
{
try
{
String from = data.foo().get();
if( from.length() == 0 )
{
from = module.name();
}
return "Hello " + name + " from " + from;
}
finally
{
data.foo().set( name );
}
}
代码示例来源:origin: apache/attic-polygene-java
@Test
public void testBindings() {
DomainType domain = transientBuilderFactory.newTransient( DomainType.class );
Object _this = domain.whatIsThis();
assertThat( _this, instanceOf(DomainType.class));
assertThat( _this, instanceOf(TransientComposite.class ) );
StateHolder state = domain.whatIsState( );
assertThat( state.properties(), notNullValue());
Application app = domain.whatIsApplication( );
assertThat( app.name(), equalTo("Script Test"));
Layer layer = domain.whatIsLayer();
assertThat( layer.name(), equalTo("Layer 1"));
Module module = domain.whatIsModule();
assertThat( module.name(), equalTo("Module 1"));
ObjectFactory of = domain.whatIsObjectFactory( );
assertThat( of, notNullValue());
UnitOfWorkFactory uowf = domain.whatIsUnitOfWorkFactory( );
assertThat( uowf, notNullValue());
ValueBuilderFactory vbf = domain.whatIsValueBuilderFactory( );
assertThat( vbf, notNullValue());
TransientBuilderFactory tbf = domain.whatIsTransientBuilderFactory( );
assertThat( tbf, notNullValue());
ServiceFinder finder = domain.whatIsServiceFinder( );
assertThat( finder, notNullValue());
TypeLookup lookup = domain.whatIsTypeLookup( );
assertThat( lookup, notNullValue());
}
内容来源于网络,如有侵权,请联系作者删除!