private NdTypeId createTypeIdFromBinaryName(char[] binaryName) { if (binaryName == null) { return null; } return this.index.createTypeId(JavaNames.binaryNameToFieldDescriptor(binaryName)); }
/** * Given a NdType, returns its identifier in the form accepted by {@link IJavaSearchScope#encloses(String)} */ public static char[] getIndexPathFor(NdType type, IWorkspaceRoot root) { NdResourceFile resourceFile = type.getResourceFile(); char[] binaryName = type.getTypeId().getBinaryName(); char[] workspaceLocation = null; if (root != null) { workspaceLocation = resourceFile.getAnyOpenWorkspaceLocation(root).toString().toCharArray(); } if (workspaceLocation == null || workspaceLocation.length == 0) { workspaceLocation = resourceFile.getLocation().getChars(); } return CharArrayUtils.concat(workspaceLocation, JAR_FILE_ENTRY_SEPARATOR, binaryNameToResourceRelativePath(binaryName)); }
public char[] getBinaryName() { return JavaNames.fieldDescriptorToBinaryName(getFieldDescriptor().getChars()); }
char[] fieldDefinition = JavaNames.fullyQualifiedNameToFieldDescriptor(type.getFullyQualifiedName().toCharArray()); NdTypeId typeId = nextType.getTypeId(); String typePath = new String(JavaNames.getIndexPathFor(nextType, root)); if (!scope2.encloses(typePath)) { continue;
public char[] getSourceName() { IString sourceName = getSourceNameOverride(); if (sourceName.length() != 0) { return sourceName.getChars(); } char[] simpleName = getTypeId().getSimpleNameCharArray(); return JavaNames.simpleNameToSourceName(simpleName); }
public NdTypeId(Nd nd, char[] fieldDescriptor) { super(nd); char[] simpleName = JavaNames.fieldDescriptorToJavaName(fieldDescriptor, false); FIELD_DESCRIPTOR.put(nd, this.address, fieldDescriptor); SIMPLE_NAME.put(nd, this.address, simpleName); }
result.append(binaryName); } else { result.append(binaryNameToSimpleName(binaryName));
char[] fieldDefinition = JavaNames.fullyQualifiedNameToFieldDescriptor(type.getFullyQualifiedName().toCharArray()); NdTypeId typeId = nextType.getTypeId(); String typePath = new String(JavaNames.getIndexPathFor(nextType, root)); if (!scope2.encloses(typePath)) { continue;
public char[] getSourceName() { IString sourceName = getSourceNameOverride(); if (sourceName.length() != 0) { return sourceName.getChars(); } char[] simpleName = getTypeId().getSimpleNameCharArray(); return JavaNames.simpleNameToSourceName(simpleName); }
public NdTypeId(Nd nd, char[] fieldDescriptor) { super(nd); char[] simpleName = JavaNames.fieldDescriptorToJavaName(fieldDescriptor, false); FIELD_DESCRIPTOR.put(nd, this.address, fieldDescriptor); SIMPLE_NAME.put(nd, this.address, simpleName); }
result.append(binaryName); } else { result.append(binaryNameToSimpleName(binaryName));
private NdTypeId createTypeIdFromBinaryName(char[] binaryName) { if (binaryName == null) { return null; } return this.index.createTypeId(JavaNames.binaryNameToFieldDescriptor(binaryName)); }
public char[] getBinaryName() { return JavaNames.fieldDescriptorToBinaryName(getFieldDescriptor().getChars()); }
/** * Given a NdType, returns its identifier in the form accepted by {@link IJavaSearchScope#encloses(String)} */ public static char[] getIndexPathFor(NdType type, IWorkspaceRoot root) { NdResourceFile resourceFile = type.getResourceFile(); char[] binaryName = type.getTypeId().getBinaryName(); char[] workspaceLocation = null; if (root != null) { workspaceLocation = resourceFile.getAnyOpenWorkspaceLocation(root).toString().toCharArray(); } if (workspaceLocation == null || workspaceLocation.length == 0) { workspaceLocation = resourceFile.getLocation().getChars(); } return CharArrayUtils.concat(workspaceLocation, JAR_FILE_ENTRY_SEPARATOR, binaryNameToResourceRelativePath(binaryName)); }
ClassSignature signature = (ClassSignature) value; char[] binaryName = JavaNames.binaryNameToFieldDescriptor(signature.getTypeName()); NdTypeSignature typeId = this.index.createTypeId(binaryName); return NdConstantClass.create(getNd(), typeId);
useInvalidArchiveCache); char[] entryNameCharArray = CharArrayUtils.concat( JavaNames.fieldDescriptorToBinaryName(descriptor.fieldDescriptor), SuffixConstants.SUFFIX_class); String entryName = new String(entryNameCharArray); ZipEntry ze = zip.getEntry(entryName);
ClassSignature signature = (ClassSignature) value; char[] binaryName = JavaNames.binaryNameToFieldDescriptor(signature.getTypeName()); NdTypeSignature typeId = this.index.createTypeId(binaryName); return NdConstantClass.create(getNd(), typeId);
useInvalidArchiveCache); char[] entryNameCharArray = CharArrayUtils.concat( JavaNames.fieldDescriptorToBinaryName(descriptor.fieldDescriptor), SuffixConstants.SUFFIX_class); String entryName = new String(entryNameCharArray); ZipEntry ze = zip.getEntry(entryName);
char[] fieldDescriptor = JavaNames.binaryNameToFieldDescriptor(binaryName); JavaIndex index = JavaIndex.getIndex(); Nd nd = index.getNd();
public static IBinaryAnnotation createBinaryAnnotation(NdAnnotation ndAnnotation) { List<NdAnnotationValuePair> elementValuePairs = ndAnnotation.getElementValuePairs(); final IBinaryElementValuePair[] resultingPair = new IBinaryElementValuePair[elementValuePairs.size()]; for (int idx = 0; idx < elementValuePairs.size(); idx++) { NdAnnotationValuePair next = elementValuePairs.get(idx); resultingPair[idx] = new ElementValuePairInfo(next.getName().getChars(), unpackValue(next.getValue())); } final char[] binaryName = JavaNames.fieldDescriptorToBinaryName( ndAnnotation.getType().getRawType().getFieldDescriptor().getChars()); return new IBinaryAnnotation() { @Override public char[] getTypeName() { return binaryName; } @Override public IBinaryElementValuePair[] getElementValuePairs() { return resultingPair; } @Override public String toString() { return BinaryTypeFormatter.annotationToString(this); } }; }