本文整理了Java中org.apache.isis.applib.Identifier.classIdentifier()
方法的一些代码示例,展示了Identifier.classIdentifier()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Identifier.classIdentifier()
方法的具体详情如下:
包路径:org.apache.isis.applib.Identifier
类名称:Identifier
方法名:classIdentifier
暂无
代码示例来源:origin: org.apache.isis.core/metamodel
/**
* The supplied method can be null; at any rate it will be ignored.
*/
@Override
public Identifier identifierFor(final Class<?> type, final Method method) {
return Identifier.classIdentifier(type);
}
},
代码示例来源:origin: org.apache.isis/applib
public static Identifier classIdentifier(final Class<?> cls) {
return classIdentifier(cls.getName());
}
代码示例来源:origin: org.apache.isis.core/isis-core-applib
public static Identifier classIdentifier(final Class<?> cls) {
return classIdentifier(cls.getName());
}
代码示例来源:origin: org.apache.isis.core/isis-core-metamodel
@Override
public Identifier getIdentifier() {
return Identifier.classIdentifier(name);
}
代码示例来源:origin: org.apache.isis.core/metamodel
@Override
public Identifier getIdentifier() {
return Identifier.classIdentifier(name);
}
代码示例来源:origin: org.apache.isis.runtimes.dflt/runtime
@Override
public Identifier getIdentifier() {
return Identifier.classIdentifier("");
}
代码示例来源:origin: org.apache.isis.core/isis-core-applib
final String className = asString.substring(0, indexOfHash == -1 ? asString.length() : indexOfHash);
if (indexOfHash == -1 || indexOfHash == (asString.length() - 1)) {
return classIdentifier(className);
代码示例来源:origin: org.apache.isis/applib
final String className = asString.substring(0, indexOfHash == -1 ? asString.length() : indexOfHash);
if (indexOfHash == -1 || indexOfHash == (asString.length() - 1)) {
return classIdentifier(className);
代码示例来源:origin: org.apache.isis.core/isis-core-applib
@Test
public void canInstantiateClassIdentifier() {
identifier = Identifier.classIdentifier(SomeDomainClass.class);
assertThat(identifier, is(not(nullValue())));
}
代码示例来源:origin: org.apache.isis.core/metamodel
public ObjectSpecificationAbstract(final Class<?> introspectedClass, final String shortName, final SpecificationContext specificationContext) {
this.correspondingClass = introspectedClass;
this.fullName = introspectedClass.getName();
this.shortName = shortName;
this.isAbstract = JavaClassUtils.isAbstract(introspectedClass);
this.identifier = Identifier.classIdentifier(introspectedClass);
// dependencies
this.authenticationSessionProvider = specificationContext.getAuthenticationSessionProvider();
this.servicesProvider = specificationContext.getServicesProvider();
this.objectInstantiator = specificationContext.getObjectInstantiator();
this.specificationLookup = specificationContext.getSpecificationLookup();
}
代码示例来源:origin: org.apache.isis.core/isis-core-applib
@Test
public void classIdentifierClassNameIsSet() {
final Class<?> domainClass = SomeDomainClass.class;
final String domainClassFullyQualifiedName = domainClass.getCanonicalName();
identifier = Identifier.classIdentifier(domainClass);
assertThat(identifier.getClassName(), is(domainClassFullyQualifiedName));
}
代码示例来源:origin: org.apache.isis.core/progmodel
public void testClass() {
manager.addLine("C:cls");
manager.addLine("Help about class");
final Identifier identifier = Identifier.classIdentifier("cls");
final String s = manager.getHelpText(identifier);
assertEquals("Help about class\n", s);
}
代码示例来源:origin: org.apache.isis.core/progmodel
public void testSkipComments() {
manager.addLine("C:cls");
manager.addLine("# comment");
manager.addLine("Help about class");
final Identifier identifier = Identifier.classIdentifier("cls");
final String s = manager.getHelpText(identifier);
assertEquals("Help about class\n", s);
}
}
代码示例来源:origin: org.apache.isis.core/progmodel
public void testClassWithNoText() {
manager.addLine("C:cls");
manager.addLine("C:cls2");
manager.addLine("Help about class");
final Identifier identifier = Identifier.classIdentifier("cls");
final String s = manager.getHelpText(identifier);
assertEquals("", s);
}
代码示例来源:origin: org.apache.isis.core/progmodel
public void testClassTextStopsAtFirstMethod() {
manager.addLine("C:cls");
manager.addLine("Help about class");
manager.addLine("M:method");
manager.addLine("Different text");
final Identifier identifier = Identifier.classIdentifier("cls");
final String s = manager.getHelpText(identifier);
assertEquals("Help about class\n", s);
}
代码示例来源:origin: org.apache.isis.core/progmodel
public void testReadBlankLines() {
manager.addLine("C:cls");
manager.addLine("");
manager.addLine("");
manager.addLine("Help about class");
final Identifier identifier = Identifier.classIdentifier("cls");
final String s = manager.getHelpText(identifier);
assertEquals("\n\nHelp about class\n", s);
}
代码示例来源:origin: org.apache.isis.core/progmodel
public void testClassTextStopsAtNextClass() {
manager.addLine("C:cls");
manager.addLine("Help about class");
manager.addLine("C:cls2");
manager.addLine("Different text");
final Identifier identifier = Identifier.classIdentifier("cls");
final String s = manager.getHelpText(identifier);
assertEquals("Help about class\n", s);
}
代码示例来源:origin: org.apache.isis.core/progmodel
public void testEntryWithMultipleLines() {
manager.addLine("C:cls");
manager.addLine("Help about class");
manager.addLine("line 2");
manager.addLine("line 3");
final Identifier identifier = Identifier.classIdentifier("cls");
final String s = manager.getHelpText(identifier);
assertEquals("Help about class\nline 2\nline 3\n", s);
}
代码示例来源:origin: org.apache.isis.runtimes.dflt.remoting/common
@Before
public void setUp() throws Exception {
BasicConfigurator.configure();
LogManager.getRootLogger().setLevel(Level.OFF);
system = new TestProxySystem();
system.init();
mockObjectAction = mockery.mock(ObjectAction.class);
mockEncoder = mockery.mock(ObjectEncoderDecoder.class);
mockDistribution = mockery.mock(ServerFacade.class);
mockActionInvocationFacet = mockery.mock(ActionInvocationFacet.class);
mockFacetHolder = mockery.mock(FacetHolder.class);
identifier = Identifier.classIdentifier("");
target = system.createTransientTestObject();
mockery.checking(new Expectations() {
{
one(mockActionInvocationFacet).getFacetHolder();
will(returnValue(mockFacetHolder));
allowing(mockObjectAction).getIdentifier();
will(returnValue((identifier)));
allowing(mockObjectAction).execute(with(equalTo(target)), with(any(ObjectAdapter[].class)));
will(returnValue(null));
}
});
proxy = new ActionInvocationFacetWrapProxy(mockActionInvocationFacet, mockDistribution, mockEncoder, mockObjectAction);
}
内容来源于网络,如有侵权,请联系作者删除!