@Override public final String toString() { return getName(); } }
@Override public int hashCode() { return getName().hashCode(); }
public String getFriendlyName(final String identifier) { Validate.notNull(identifier, "Identifier required"); final LogicalPath p = getPath(identifier); if (p == null) { return identifier; } return p.getName() + getRelativeSegment(identifier); }
/** * Creates a metadata ID from the given inputs * * @param metadataClass the fully-qualified name of the metadata class * (required) * @param projectType the fully-qualified name of the user project type to * which the metadata relates (required) * @param path the path to that type within the project (required) * @return a non-blank ID */ public static String createIdentifier(final String metadataClass, final JavaType projectType, final LogicalPath path) { Validate.notNull(projectType, "Java type required"); Validate.notNull(path, "Path required"); return MetadataIdentificationUtils.create(metadataClass, path.getName() + PATH_SUFFIX + projectType.getFullyQualifiedTypeName()); }
public boolean getAllPossibleValues(final List<Completion> completions, final Class<?> targetType, final String existingData, final String optionContext, final MethodTarget target) { for (final Pom pom : projectOperations.getPoms()) { for (final PhysicalPath physicalPath : pom.getPhysicalPaths()) { completions.add(new Completion(physicalPath.getLogicalPath().getName())); } } return false; }
physicalTypeIdentifier = MetadataIdentificationUtils.create(PhysicalTypeIdentifier.class.getName(), path.getName() + "?" + javaType.getFullyQualifiedTypeName()); break;
/** * Creates a metadata ID from the given inputs * * @param metadataClass the fully-qualified name of the metadata class * (required) * @param projectType the fully-qualified name of the user project type to * which the metadata relates (required) * @param path the path to that type within the project (required) * @return a non-blank ID */ public static String createIdentifier(final String metadataClass, final JavaType projectType, final LogicalPath path) { Validate.notNull(projectType, "Java type required"); Validate.notNull(path, "Path required"); return MetadataIdentificationUtils.create(metadataClass, path.getName() + PATH_SUFFIX + projectType.getFullyQualifiedTypeName()); }
physicalTypeIdentifier = MetadataIdentificationUtils.create(PhysicalTypeIdentifier.class.getName(), path.getName() + "?" + javaType.getFullyQualifiedTypeName()); break;