@Override public String toString() { try { return "class " + new String(getSourceName()); //$NON-NLS-1$ } catch (RuntimeException e) { return super.toString(); } }
@Override public String toString() { try { return "class " + new String(getSourceName()); //$NON-NLS-1$ } catch (RuntimeException e) { return super.toString(); } }
@Override public char[] getSourceName() { try (IReader rl = this.typeRef.lock()) { NdType type = this.typeRef.get(); if (type != null) { return type.getSourceName(); } else { return new char[0]; } } }
@Override public char[] getSourceName() { try (IReader rl = this.typeRef.lock()) { NdType type = this.typeRef.get(); if (type != null) { return type.getSourceName(); } else { return new char[0]; } } }
/** * Sets the source name for this type. */ public void setSourceNameOverride(char[] sourceName) { char[] oldSourceName = getSourceName(); if (!CharArrayUtils.equals(oldSourceName, sourceName)) { INNER_CLASS_SOURCE_NAME.put(getNd(), this.address, sourceName); } }
/** * Sets the source name for this type. */ public void setSourceNameOverride(char[] sourceName) { char[] oldSourceName = getSourceName(); if (!CharArrayUtils.equals(oldSourceName, sourceName)) { INNER_CLASS_SOURCE_NAME.put(getNd(), this.address, sourceName); } }
private static HierarchyBinaryType createBinaryTypeFrom(NdType type) { char[] enclosingTypeName = null; NdTypeSignature enclosingType = type.getDeclaringType(); if (enclosingType != null) { enclosingTypeName = enclosingType.getRawType().getBinaryName(); } char[][] typeParameters = type.getTypeParameterSignatures(); NdTypeId typeId = type.getTypeId(); HierarchyBinaryType result = new HierarchyBinaryType(type.getModifiers(), typeId.getBinaryName(), type.getSourceName(), enclosingTypeName, typeParameters.length == 0 ? null : typeParameters); NdTypeSignature superClass = type.getSuperclass(); if (superClass != null) { result.recordSuperclass(superClass.getRawType().getBinaryName()); } for (NdTypeInterface interf : type.getInterfaces()) { result.recordInterface(interf.getInterface().getRawType().getBinaryName()); } return result; }
private static HierarchyBinaryType createBinaryTypeFrom(NdType type) { char[] enclosingTypeName = null; NdTypeSignature enclosingType = type.getDeclaringType(); if (enclosingType != null) { enclosingTypeName = enclosingType.getRawType().getBinaryName(); } char[][] typeParameters = type.getTypeParameterSignatures(); NdTypeId typeId = type.getTypeId(); HierarchyBinaryType result = new HierarchyBinaryType(type.getModifiers(), typeId.getBinaryName(), type.getSourceName(), enclosingTypeName, typeParameters.length == 0 ? null : typeParameters); NdTypeSignature superClass = type.getSuperclass(); if (superClass != null) { result.recordSuperclass(superClass.getRawType().getBinaryName()); } for (NdTypeInterface interf : type.getInterfaces()) { result.recordInterface(interf.getInterface().getRawType().getBinaryName()); } return result; }