org.nakedobjects.metamodel.spec.NakedObjectSpecification.getFullName()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中org.nakedobjects.metamodel.spec.NakedObjectSpecification.getFullName()方法的一些代码示例,展示了NakedObjectSpecification.getFullName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NakedObjectSpecification.getFullName()方法的具体详情如下:
包路径:org.nakedobjects.metamodel.spec.NakedObjectSpecification
类名称:NakedObjectSpecification
方法名:getFullName

NakedObjectSpecification.getFullName介绍

[英]Returns the name of this specification. This will be the fully qualified name of the Class object that this object represents (i.e. it includes the package name).
[中]返回此规范的名称。这将是该对象所代表的类对象的完全限定名(即,它包括包名)。

代码示例

代码示例来源:origin: org.nakedobjects/metamodel

/**
 * Helper, used within contructor chaining
 */
private static String[] toParameterStringArray(final NakedObjectSpecification[] specifications) {
  final String[] parameters = new String[specifications == null ? 0 : specifications.length];
  for (int i = 0; i < parameters.length; i++) {
    parameters[i] = specifications[i].getFullName();
  }
  return parameters;
}

代码示例来源:origin: org.nakedobjects.core/runtime

private static String[] specificationNames(final NakedObjectSpecification[] specifications) {
  final String[] names = new String[specifications.length];
  for (int i = 0; i < names.length; i++) {
    names[i] = specifications[i].getFullName();
  }
  return names;
}

代码示例来源:origin: org.nakedobjects.plugins/htmlviewer-viewer

public void debug(final DebugString debug) {
  debug.appendln(specification.getFullName());
  if (version != null) {
    debug.appendln(version.toString());
  }
}

代码示例来源:origin: org.nakedobjects.plugins/html-viewer

public void debug(final DebugString debug) {
  debug.appendln(specification.getFullName());
  if (version != null) {
    debug.appendln(version.toString());
  }
}

代码示例来源:origin: org.nakedobjects.core/metamodel

protected static void checkChoicesType(RuntimeContext runtimeContext, Object[] objects, NakedObjectSpecification paramSpec) {
  for (Object object : objects) {
    NakedObjectSpecification componentSpec = runtimeContext.getSpecificationLoader().loadSpecification(object.getClass());
    if (!componentSpec.isOfType(paramSpec)) {
      throw new ModelException("Choice type incompatible with parameter type; expected " + paramSpec.getFullName() + ", but was " + componentSpec.getFullName());
    }
  }
}

代码示例来源:origin: org.nakedobjects.core/runtime

private void recreateAdapters() {
  for(NakedObjectSpecification noSpec: persistedObjects.specifications()) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("recreating adapters for: " + noSpec.getFullName());
    }
    recreateAdapters(persistedObjects.instancesFor(noSpec));
  }
}

代码示例来源:origin: org.nakedobjects/remoting

private boolean hasInstancesFromPersistenceLayer(
    final NakedObjectSpecification specification) {
  final String specFullName = specification.getFullName();
  return getTransactionManager().executeWithinTransaction(
    new TransactionalClosureWithReturnAbstract<Boolean>(){
      public Boolean execute() {
        HasInstancesRequest request = new HasInstancesRequest(getAuthenticationSession(), specFullName);
        HasInstancesResponse response = serverFacade.hasInstances(request);
        return response.hasInstances();
      }});
}

代码示例来源:origin: org.nakedobjects.core/remoting

private boolean hasInstancesFromPersistenceLayer(
    final NakedObjectSpecification specification) {
  final String specFullName = specification.getFullName();
  return getTransactionManager().executeWithinTransaction(
    new TransactionalClosureWithReturnAbstract<Boolean>(){
      public Boolean execute() {
        HasInstancesRequest request = new HasInstancesRequest(getAuthenticationSession(), specFullName);
        HasInstancesResponse response = serverFacade.hasInstances(request);
        return response.hasInstances();
      }});
}

代码示例来源:origin: org.nakedobjects/remoting

private NakedObject restoreLeafObject(final String encodedObject, final NakedObjectSpecification specification) {
  final EncodableFacet encoder = specification.getFacet(EncodableFacet.class);
  if (encoder == null) {
    throw new NakedObjectException("No encoder for " + specification.getFullName());
  }
  final NakedObject object = encoder.fromEncodedString(encodedObject);
  return object;
}

代码示例来源:origin: org.nakedobjects.core/remoting

private NakedObject restoreLeafObject(final String encodedObject, final NakedObjectSpecification specification) {
  final EncodableFacet encoder = specification.getFacet(EncodableFacet.class);
  if (encoder == null) {
    throw new NakedObjectException("No encoder for " + specification.getFullName());
  }
  final NakedObject object = encoder.fromEncodedString(encodedObject);
  return object;
}

代码示例来源:origin: org.nakedobjects/remoting

public NakedObject execute() {
      // NB: I think that the auth session must be null because we may not yet have logged in if retrieving the services.
      GetObjectRequest request = new GetObjectRequest(null, oid, specHint.getFullName());
      GetObjectResponse response = serverFacade.getObject(request);
      final ObjectData data = response.getObjectData();
      return encoderDecoder.decode(data);
    }});
}

代码示例来源:origin: org.nakedobjects/metamodel

@Override
public int hashCode() {
  if (!hashCodeCached) {
    hashCode = HashCodeUtils.SEED;
    hashCode = HashCodeUtils.hash(hashCode, getSpecification().getFullName());
    hashCode = HashCodeUtils.hash(hashCode, getObject());
    hashCodeCached = true;
  }
  return hashCode;
}

代码示例来源:origin: org.nakedobjects.core/metamodel

@Override
public int hashCode() {
  if (!hashCodeCached) {
    hashCode = HashCodeUtils.SEED;
    hashCode = HashCodeUtils.hash(hashCode, getSpecification().getFullName());
    hashCode = HashCodeUtils.hash(hashCode, getObject());
    hashCodeCached = true;
  }
  return hashCode;
}

代码示例来源:origin: org.nakedobjects.core/remoting

public NakedObject execute() {
      // NB: I think that the auth session must be null because we may not yet have logged in if retrieving the services.
      GetObjectRequest request = new GetObjectRequest(null, oid, specHint.getFullName());
      GetObjectResponse response = serverFacade.getObject(request);
      final ObjectData data = response.getObjectData();
      return encoderDecoder.decode(data);
    }});
}

代码示例来源:origin: org.nakedobjects.core/remoting

/**
 * Creates a ReferenceData that contains the type, version and OID for the specified object. This can only
 * be used for persistent objects.
 * 
 * <p>
 * Called both client and server-side, in multiple locations. 
 */
public final IdentityData encodeIdentityData(final NakedObject object) {
  Assert.assertNotNull("OID needed for reference", object, object.getOid());
  return dataFactory.createIdentityData(object.getSpecification().getFullName(), object.getOid(), object.getVersion());
}

代码示例来源:origin: org.nakedobjects/remoting

/**
 * Creates a ReferenceData that contains the type, version and OID for the specified object. This can only
 * be used for persistent objects.
 * 
 * <p>
 * Called both client and server-side, in multiple locations. 
 */
public final IdentityData encodeIdentityData(final NakedObject object) {
  Assert.assertNotNull("OID needed for reference", object, object.getOid());
  return dataFactory.createIdentityData(object.getSpecification().getFullName(), object.getOid(), object.getVersion());
}

代码示例来源:origin: org.nakedobjects.core/runtime

public void debugData(final DebugString debug) {
  debug.appendTitle("Domain Objects");
  for(final NakedObjectSpecification spec: persistedObjects.specifications()) {
    debug.appendln(spec.getFullName());
    final ObjectStoreInstances instances = instancesFor(spec);
    instances.debugData(debug);
  }
  debug.unindent();
  debug.appendln();
}

代码示例来源:origin: org.nakedobjects/metamodel

@Override
public String toString() {
  final ToString str = new ToString(this);
  str.append("class", fullName);
  str.append("type", SpecUtils.typeNameFor(this));
  str.append("persistable", persistable);
  str.append("superclass", superClassSpecification == null ? "Object" : superClassSpecification.getFullName());
  return str.toString();
}

代码示例来源:origin: org.nakedobjects.core/metamodel

@Override
public String toString() {
  final ToString str = new ToString(this);
  str.append("class", fullName);
  str.append("type", SpecUtils.typeNameFor(this));
  str.append("persistable", persistable);
  str.append("superclass", superClassSpecification == null ? "Object" : superClassSpecification.getFullName());
  return str.toString();
}

代码示例来源:origin: org.nakedobjects.plugins/dndviewer

@Override
public String toString() {
  final ToString toString = new ToString(this);
  toString.append("label", getParameterName());
  toString.append("required", isRequired());
  toString.append("spec", getSpecification().getFullName());
  toString.append("object", adapter == null ? "null" : adapter.titleString());
  return toString.toString();
}

相关文章

微信公众号

最新文章

更多