public void addTypeDefinition(final TypeDefinition type) { VerifyArgument.notNull(type, "type"); _types.putIfAbsent(type.getInternalName(), type); }
public void addTypeDefinition(final TypeDefinition type) { VerifyArgument.notNull(type, "type"); _types.putIfAbsent(type.getInternalName(), type); }
public void addTypeDefinition(final TypeDefinition type) { VerifyArgument.notNull(type, "type"); _types.putIfAbsent(type.getInternalName(), type); }
public final TypeDeclaration createType(final TypeDefinition type) { VerifyArgument.notNull(type, "type"); final Reference<TypeDeclaration> existingDeclaration = _typeDeclarations.get(type.getInternalName()); final TypeDeclaration d; if (existingDeclaration != null && (d = existingDeclaration.get()) != null) { return d; } return createTypeNoCache(type); }
public final TypeDeclaration createType(final TypeDefinition type) { VerifyArgument.notNull(type, "type"); final Reference<TypeDeclaration> existingDeclaration = _typeDeclarations.get(type.getInternalName()); final TypeDeclaration d; if (existingDeclaration != null && (d = existingDeclaration.get()) != null) { return d; } return createTypeNoCache(type); }
public final TypeDeclaration createType(final TypeDefinition type) { VerifyArgument.notNull(type, "type"); final Reference<TypeDeclaration> existingDeclaration = _typeDeclarations.get(type.getInternalName()); final TypeDeclaration d; if (existingDeclaration != null && (d = existingDeclaration.get()) != null) { return d; } return createTypeNoCache(type); }
@Override public Void visitTypeDeclaration(final TypeDeclaration node, final Void _) { final TypeDefinition type = node.getUserData(Keys.TYPE_DEFINITION); if (type != null) { if (!_visitedTypes.add(type.getInternalName())) { return null; } } return super.visitTypeDeclaration(node, _); }
@Override public Void visitTypeDeclaration(final TypeDeclaration node, final Void p) { final TypeDefinition type = node.getUserData(Keys.TYPE_DEFINITION); if (type != null) { if (!_visitedTypes.add(type.getInternalName())) { return null; } } return super.visitTypeDeclaration(node, p); }
@Override public Void visitTypeDeclaration(final TypeDeclaration node, final Void _) { final TypeDefinition type = node.getUserData(Keys.TYPE_DEFINITION); if (type != null) { if (!_visitedTypes.add(type.getInternalName())) { return null; } } return super.visitTypeDeclaration(node, _); }
public void addTypeDefinition(final TypeDefinition type) { VerifyArgument.notNull(type, "type"); resolvedTypes.put(type.getInternalName(), type); }
public void addTypeDefinition(final TypeDefinition type) { VerifyArgument.notNull(type, "type"); resolvedTypes.put(type.getInternalName(), type); }
@Override public Void visitTypeDeclaration(final TypeDeclaration typeDeclaration, final Void _) { final boolean oldIsSwitchMapWrapper = _isSwitchMapWrapper; final TypeDefinition typeDefinition = typeDeclaration.getUserData(Keys.TYPE_DEFINITION); final boolean isSwitchMapWrapper = isSwitchMapWrapper(typeDefinition); if (isSwitchMapWrapper) { final String internalName = typeDefinition.getInternalName(); SwitchMapInfo info = _switchMaps.get(internalName); if (info == null) { _switchMaps.put(internalName, info = new SwitchMapInfo(internalName)); } info.enclosingTypeDeclaration = typeDeclaration; } _isSwitchMapWrapper = isSwitchMapWrapper; try { super.visitTypeDeclaration(typeDeclaration, _); } finally { _isSwitchMapWrapper = oldIsSwitchMapWrapper; } rewrite(); return null; }
@Override public Void visitTypeDeclaration(final TypeDeclaration typeDeclaration, final Void _) { final boolean oldIsSwitchMapWrapper = _isSwitchMapWrapper; final TypeDefinition typeDefinition = typeDeclaration.getUserData(Keys.TYPE_DEFINITION); final boolean isSwitchMapWrapper = isSwitchMapWrapper(typeDefinition); if (isSwitchMapWrapper) { final String internalName = typeDefinition.getInternalName(); SwitchMapInfo info = _switchMaps.get(internalName); if (info == null) { _switchMaps.put(internalName, info = new SwitchMapInfo(internalName)); } info.enclosingTypeDeclaration = typeDeclaration; } _isSwitchMapWrapper = isSwitchMapWrapper; try { super.visitTypeDeclaration(typeDeclaration, _); } finally { _isSwitchMapWrapper = oldIsSwitchMapWrapper; } rewrite(); return null; }
@Override public Void visitTypeDeclaration(final TypeDeclaration typeDeclaration, final Void p) { final boolean oldIsSwitchMapWrapper = _isSwitchMapWrapper; final TypeDefinition typeDefinition = typeDeclaration.getUserData(Keys.TYPE_DEFINITION); final boolean isSwitchMapWrapper = isSwitchMapWrapper(typeDefinition); if (isSwitchMapWrapper) { final String internalName = typeDefinition.getInternalName(); SwitchMapInfo info = _switchMaps.get(internalName); if (info == null) { _switchMaps.put(internalName, info = new SwitchMapInfo(internalName)); } info.enclosingTypeDeclaration = typeDeclaration; } _isSwitchMapWrapper = isSwitchMapWrapper; try { super.visitTypeDeclaration(typeDeclaration, p); } finally { _isSwitchMapWrapper = oldIsSwitchMapWrapper; } rewrite(); return null; }
private void addTypeMembers(final TypeDeclaration astType, final TypeDefinition type) { for (final FieldDefinition field : type.getDeclaredFields()) { astType.addChild(createField(field), Roles.TYPE_MEMBER); } for (final MethodDefinition method : type.getDeclaredMethods()) { if (method.isConstructor()) { astType.addChild(createConstructor(method), Roles.TYPE_MEMBER); } else { astType.addChild(createMethod(method), Roles.TYPE_MEMBER); } } final List<TypeDefinition> nestedTypes = new ArrayList<>(); for (final TypeDefinition nestedType : type.getDeclaredTypes()) { final TypeReference declaringType = nestedType.getDeclaringType(); if (!nestedType.isLocalClass() && type.isEquivalentTo(declaringType)) { if (nestedType.isAnonymous()) { _typeDeclarations.put(type.getInternalName(), new SoftReference<>(astType)); } else { nestedTypes.add(nestedType); } } } sortNestedTypes(nestedTypes); for (final TypeDefinition nestedType : nestedTypes) { astType.addChild(createTypeNoCache(nestedType), Roles.TYPE_MEMBER); } }
private void addTypeMembers(final TypeDeclaration astType, final TypeDefinition type) { for (final FieldDefinition field : type.getDeclaredFields()) { astType.addChild(createField(field), Roles.TYPE_MEMBER); } for (final MethodDefinition method : type.getDeclaredMethods()) { if (method.isConstructor()) { astType.addChild(createConstructor(method), Roles.TYPE_MEMBER); } else { astType.addChild(createMethod(method), Roles.TYPE_MEMBER); } } final List<TypeDefinition> nestedTypes = new ArrayList<>(); for (final TypeDefinition nestedType : type.getDeclaredTypes()) { final TypeReference declaringType = nestedType.getDeclaringType(); if (!nestedType.isLocalClass() && type.isEquivalentTo(declaringType)) { if (nestedType.isAnonymous()) { _typeDeclarations.put(type.getInternalName(), new SoftReference<>(astType)); } else { nestedTypes.add(nestedType); } } } sortNestedTypes(nestedTypes); for (final TypeDefinition nestedType : nestedTypes) { astType.addChild(createTypeNoCache(nestedType), Roles.TYPE_MEMBER); } }
private void addTypeMembers(final TypeDeclaration astType, final TypeDefinition type) { for (final FieldDefinition field : type.getDeclaredFields()) { astType.addChild(createField(field), Roles.TYPE_MEMBER); } for (final MethodDefinition method : type.getDeclaredMethods()) { if (method.isConstructor()) { astType.addChild(createConstructor(method), Roles.TYPE_MEMBER); } else { astType.addChild(createMethod(method), Roles.TYPE_MEMBER); } } final List<TypeDefinition> nestedTypes = new ArrayList<>(); for (final TypeDefinition nestedType : type.getDeclaredTypes()) { final TypeReference declaringType = nestedType.getDeclaringType(); if (!nestedType.isLocalClass() && type.isEquivalentTo(declaringType)) { if (nestedType.isAnonymous()) { _typeDeclarations.put(type.getInternalName(), new SoftReference<>(astType)); } else { nestedTypes.add(nestedType); } } } sortNestedTypes(nestedTypes); for (final TypeDefinition nestedType : nestedTypes) { astType.addChild(createTypeNoCache(nestedType), Roles.TYPE_MEMBER); } }
StringUtilities.equals(context.getCurrentType().getInternalName(), reference.getDeclaringType().getInternalName())) {
StringUtilities.equals(context.getCurrentType().getInternalName(), reference.getDeclaringType().getInternalName())) {
StringUtilities.equals(context.getCurrentType().getInternalName(), reference.getDeclaringType().getInternalName())) {