protected NakedObjectMemberAbstract( final String id, final Identified facetHolder, final MemberType memberType, final RuntimeContext runtimeContext) { if (id == null) { throw new IllegalArgumentException("Name must always be set"); } this.id = id; this.defaultName = NameConvertorUtils.naturalName(id); this.facetHolder = facetHolder; this.memberType = memberType; this.runtimeContext = runtimeContext; }
private NakedObjectMemberPeer getMemberWithName(final String name) { final String searchName = NameConvertorUtils.simpleName(name); for (int i = 0; i < members.length; i++) { final NakedObjectMemberPeer member = members[i]; if (member != null) { final String testName = NameConvertorUtils.simpleName(member.getIdentifier().getMemberName()); if (testName.equals(searchName)) { members[i] = null; return member; } } } return null; }
NamedFacet namedFacet = (NamedFacet) getFacet(NamedFacet.class); if (namedFacet == null) { namedFacet = new NamedFacetInferred(NameConvertorUtils.naturalName(shortName), this); addFacet(namedFacet); pluralFacet = new PluralFacetInferred(NameConvertorUtils.pluralName(namedFacet.value()), this); addFacet(pluralFacet);
NamedFacet namedFacet = (NamedFacet) getFacet(NamedFacet.class); if (namedFacet == null) { namedFacet = new NamedFacetInferred(NameConvertorUtils.naturalName(shortName), this); addFacet(namedFacet); pluralFacet = new PluralFacetInferred(NameConvertorUtils.pluralName(namedFacet.value()), this); addFacet(pluralFacet);
protected NakedObjectMemberAbstract( final String id, final Identified facetHolder, final MemberType memberType, final RuntimeContext runtimeContext) { if (id == null) { throw new IllegalArgumentException("Name must always be set"); } this.id = id; this.defaultName = NameConvertorUtils.naturalName(id); this.facetHolder = facetHolder; this.memberType = memberType; this.runtimeContext = runtimeContext; }
private NakedObjectMemberPeer getMemberWithName(final String name) { final String searchName = NameConvertorUtils.simpleName(name); for (int i = 0; i < members.length; i++) { final NakedObjectMemberPeer member = members[i]; if (member != null) { final String testName = NameConvertorUtils.simpleName(member.getIdentifier().getMemberName()); if (testName.equals(searchName)) { members[i] = null; return member; } } } return null; }
public ExceptionMessageContent(final Throwable error) { String fullName = error.getClass().getName(); fullName = fullName.substring(fullName.lastIndexOf('.') + 1); name = NameConvertorUtils.naturalName(fullName); message = error.getMessage(); trace = ExceptionHelper.exceptionTraceAsString(error); if (trace.indexOf("\tat") != -1) { trace = trace.substring(trace.indexOf("\tat")); } if (name == null) { name = ""; } if (message == null) { message = ""; } if (trace == null) { trace = ""; } if (error instanceof NakedObjectApplicationException) { title = "Application Error"; icon = "application-error"; } else if (error instanceof ConcurrencyException) { title = "Concurrency Error"; icon = "concurrency-error"; } else { title = "System Error"; icon = "system-error"; } }
public NakedObjectSpecificationNoMember( final String className, final RuntimeContext runtimeContext) { super(runtimeContext); this.fullName = className; this.name = NameConvertorUtils.simpleName(className.substring(className.lastIndexOf('.') + 1)); identifier = Identifier.classIdentifier(className); throw new UnexpectedCallException(className); }
/** * Must be called after the checkForXxxPrefix methods. */ private void defaultNamedFacet( final List<Facet> actionFacets, final MethodRemover methodRemover, final String capitalizedName, final FacetHolder action) { String name = removePrefix(capitalizedName, LOCAL_PREFIX); name = removePrefix(name, REMOTE_PREFIX); name = removePrefix(name, DEBUG_PREFIX); name = removePrefix(name, EXPLORATION_PREFIX); name = removePrefix(name, LOCAL_PREFIX); name = removePrefix(name, REMOTE_PREFIX); name = NameConvertorUtils.naturalName(name); actionFacets.add(new NamedFacetInferred(name, action)); }
public NakedObjectSpecificationNoMember( final String className, final RuntimeContext runtimeContext) { super(runtimeContext); this.fullName = className; this.name = NameConvertorUtils.simpleName(className.substring(className.lastIndexOf('.') + 1)); identifier = Identifier.classIdentifier(className); throw new UnexpectedCallException(className); }
/** * Must be called after the checkForXxxPrefix methods. */ private void defaultNamedFacet( final List<Facet> actionFacets, final MethodRemover methodRemover, final String capitalizedName, final FacetHolder action) { String name = removePrefix(capitalizedName, LOCAL_PREFIX); name = removePrefix(name, REMOTE_PREFIX); name = removePrefix(name, DEBUG_PREFIX); name = removePrefix(name, EXPLORATION_PREFIX); name = removePrefix(name, LOCAL_PREFIX); name = removePrefix(name, REMOTE_PREFIX); name = NameConvertorUtils.naturalName(name); actionFacets.add(new NamedFacetInferred(name, action)); }
order[i] = NameConvertorUtils.simpleName(order[i]);
order[i] = NameConvertorUtils.simpleName(order[i]);