public PackageVisibilityStatement(ImportReference pkgRef, ModuleReference[] targets) { this.pkgRef = pkgRef; this.pkgName = CharOperation.concatWith(this.pkgRef.tokens, '.'); this.targets = targets; } public boolean isQualified() {
public ModuleDeclaration(CompilationResult compilationResult, char[][] tokens, long[] positions) { this.compilationResult = compilationResult; this.exportsCount = 0; this.requiresCount = 0; this.tokens = tokens; this.moduleName = CharOperation.concatWith(tokens, '.'); this.sourcePositions = positions; this.sourceEnd = (int) (positions[positions.length-1] & 0x00000000FFFFFFFF); this.sourceStart = (int) (positions[0] >>> 32); }
public char[] readableName() { if (this.onDemand) return CharOperation.concat(CharOperation.concatWith(this.compoundName, '.'), ".*".toCharArray()); //$NON-NLS-1$ else return CharOperation.concatWith(this.compoundName, '.'); } public String toString() {
@Override public char[] readableName() { if (this.onDemand) return CharOperation.concat(CharOperation.concatWith(this.compoundName, '.'), ".*".toCharArray()); //$NON-NLS-1$ else return CharOperation.concatWith(this.compoundName, '.'); } @Override
public NameEnvironmentAnswer findType(char[][] compoundName) { if (compoundName != null) return findClass( new String(CharOperation.concatWith(compoundName, '/')), compoundName[compoundName.length - 1], false); return null; } public char[][][] findTypeNames(char[][] packageName) {
public void contradictoryNullAnnotationsOnBounds(Annotation annotation, long previousTagBit) { char[][] annotationName = previousTagBit == TagBits.AnnotationNonNull ? this.options.nonNullAnnotationName : this.options.nullableAnnotationName; String[] arguments = { new String(CharOperation.concatWith(annotationName, '.')), }; String[] shortArguments = { new String(annotationName[annotationName.length-1]), }; this.handle(IProblem.ContradictoryNullAnnotationsOnBound, arguments, shortArguments, annotation.sourceStart, annotation.sourceEnd); }
public String toString() { StringBuffer buffer = new StringBuffer(10); buffer.append("ProblemType:[compoundName="); //$NON-NLS-1$ buffer.append(this.compoundName == null ? "<null>" : new String(CharOperation.concatWith(this.compoundName,'.'))); //$NON-NLS-1$ buffer.append("][problemID=").append(problemReasonString(this.problemReason)); //$NON-NLS-1$ buffer.append("][closestMatch="); //$NON-NLS-1$ buffer.append(this.closestMatch == null ? "<null>" : this.closestMatch.toString()); //$NON-NLS-1$ buffer.append("]"); //$NON-NLS-1$ return buffer.toString(); } }
public void contradictoryNullAnnotationsOnBounds(Annotation annotation, long previousTagBit) { char[][] annotationName = previousTagBit == TagBits.AnnotationNonNull ? this.options.nonNullAnnotationName : this.options.nullableAnnotationName; String[] arguments = { new String(CharOperation.concatWith(annotationName, '.')), }; String[] shortArguments = { new String(annotationName[annotationName.length-1]), }; this.handle(IProblem.ContradictoryNullAnnotationsOnBound, arguments, shortArguments, annotation.sourceStart, annotation.sourceEnd); }
@Override public String toString() { StringBuffer buffer = new StringBuffer(10); buffer.append("ProblemType:[compoundName="); //$NON-NLS-1$ buffer.append(this.compoundName == null ? "<null>" : new String(CharOperation.concatWith(this.compoundName,'.'))); //$NON-NLS-1$ buffer.append("][problemID=").append(problemReasonString(this.problemReason)); //$NON-NLS-1$ buffer.append("][closestMatch="); //$NON-NLS-1$ buffer.append(this.closestMatch == null ? "<null>" : this.closestMatch.toString()); //$NON-NLS-1$ buffer.append("]"); //$NON-NLS-1$ return buffer.toString(); } }
/** * @see ISourceElementRequestor#acceptPackage(ImportReference) */ @Override public void acceptPackage(ImportReference importReference) { this.packageName = CharOperation.concatWith(importReference.getImportName(), '.'); } /**
private void acceptPackageVisibilityStatements(PackageVisibilityStatement[] pvs, Scope scope) { if (pvs != null) { for (PackageVisibilityStatement pv : pvs) { if (pv.pkgRef instanceof SelectionOnPackageVisibilityReference) { this.noProposal = false; this.requestor.acceptPackage(CharOperation.concatWith(((SelectionOnPackageVisibilityReference) pv.pkgRef).tokens, '.')); } } } } private void selectMemberTypeFromImport(CompilationUnitDeclaration parsedUnit, char[] lastToken, ReferenceBinding ref, boolean staticOnly) {
public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName) { if (typeName != null) return findClass( new String(CharOperation.concatWith(packageName, typeName, '/')), typeName, false); return null; } public boolean isPackage(char[][] compoundName, char[] packageName) {
@Override public StringBuffer print(int indent, StringBuffer output) { printIndent(indent, output).append("<SelectOnPackageVisibility:"); //$NON-NLS-1$ output.append(new String(CharOperation.concatWith(this.tokens, '.'))); return output.append('>'); } }
private static Service createService(TypeReference service, TypeReference[] with) { Service ser = new Service(); ser.provides = CharOperation.concatWith(service.getTypeName(), '.'); ser.with = new char[with.length][]; for (int i = 0; i < with.length; i++) { ser.with[i] = CharOperation.concatWith(with[i].getTypeName(), '.'); } return ser; } private static PackageExportImpl createPackageOpen(OpensStatement ref) {
@Override public Name getQualifiedName() { ReferenceBinding binding = (ReferenceBinding)_binding; char[] qName; if (binding.isMemberType()) { qName = CharOperation.concatWith(binding.enclosingType().compoundName, binding.sourceName, '.'); CharOperation.replace(qName, '$', '.'); } else { qName = CharOperation.concatWith(binding.compoundName, '.'); } return new NameImpl(qName); }
@Override public void acceptPackage(ImportReference importReference) { int[] sourceRange= new int[] {importReference.declarationSourceStart, importReference.declarationSourceEnd}; char[] name = CharOperation.concatWith(importReference.getImportName(), '.'); this.fNode= new DOMPackage(this.fDocument, sourceRange, new String(name)); addChild(this.fNode); } /**
private AccessRestriction getViolatedRestriction(String typeName, String packageName, ClasspathEntry entry, AccessRestriction accessRestriction) { AccessRuleSet accessRuleSet = entry.getAccessRuleSet(); if (accessRuleSet != null) { // TODO (philippe) improve char[] <-> String conversions to avoid performing them on the fly char[][] packageChars = CharOperation.splitOn('.', packageName.toCharArray()); char[] typeChars = typeName.toCharArray(); accessRestriction = accessRuleSet.getViolatedRestriction(CharOperation.concatWith(packageChars, typeChars, '/')); } return accessRestriction; }
public char [][] getTypeName() { switch (this.kind) { case Wildcard.UNBOUND : return new char[][] { WILDCARD_NAME }; case Wildcard.EXTENDS : return new char[][] { CharOperation.concat(WILDCARD_NAME, WILDCARD_EXTENDS, CharOperation.concatWith(this.bound.getTypeName(), '.')) }; default: // SUPER return new char[][] { CharOperation.concat(WILDCARD_NAME, WILDCARD_SUPER, CharOperation.concatWith(this.bound.getTypeName(), '.')) }; } }
private static String[] typeSignatures(TypeReference[] types) { int length = types.length; String[] typeSignatures = new String[length]; for(int i = 0; i < length; i++) { char[][] compoundName = types[i].getParameterizedTypeName(); char[] typeName = CharOperation.concatWith(compoundName, '.'); typeSignatures[i] = Signature.createTypeSignature(typeName, false/*don't resolve*/); } return typeSignatures; } /**
@Override public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, char[] moduleName) { return findClass( String.valueOf(CharOperation.concatWith(packageName, typeName, '/')), typeName, LookupStrategy.get(moduleName), LookupStrategy.getStringName(moduleName)); }