List of usage examples for org.eclipse.jdt.core.dom ITypeBinding getDeclaredModifiers
public int getDeclaredModifiers();
From source file:org.eclipse.wb.internal.core.utils.ast.binding.DesignerTypeBinding.java
License:Open Source License
DesignerTypeBinding(BindingContext context, String fullyQualifiedName, ITypeBinding binding) { if (fullyQualifiedName != null) { context.register(fullyQualifiedName, this); }/*from ww w . ja v a 2s. c o m*/ { IPackageBinding jdtPackageBinding = binding.getPackage(); if (jdtPackageBinding != null) { m_packageBinding = new DesignerPackageBinding(jdtPackageBinding); } else { m_packageBinding = null; } } m_name = binding.getName(); m_key = binding.getKey(); // flags m_class = binding.isClass(); m_primitive = binding.isPrimitive(); m_nullType = binding.isNullType(); m_interface = binding.isInterface(); m_enum = binding.isEnum(); m_topLevel = binding.isTopLevel(); m_nested = binding.isNested(); m_member = binding.isMember(); m_local = binding.isLocal(); m_anonymous = binding.isAnonymous(); // generics m_genericType = binding.isGenericType(); m_parameterizedType = binding.isParameterizedType(); m_typeVariable = binding.isTypeVariable(); { ITypeBinding typeDeclaration = binding.getTypeDeclaration(); if (typeDeclaration == binding) { m_typeDeclaration = this; } else { m_typeDeclaration = context.get(typeDeclaration); } } { ITypeBinding[] typeArguments = binding.getTypeArguments(); m_typeArguments = new ITypeBinding[typeArguments.length]; for (int i = 0; i < typeArguments.length; i++) { ITypeBinding typeArgument = typeArguments[i]; m_typeArguments[i] = context.get(typeArgument, true); } } { ITypeBinding[] typeBounds = binding.getTypeBounds(); m_typeBounds = new ITypeBinding[typeBounds.length]; for (int i = 0; i < typeBounds.length; i++) { ITypeBinding typeBound = typeBounds[i]; m_typeBounds[i] = context.get(typeBound); } } { ITypeBinding[] typeParameters = binding.getTypeParameters(); m_typeParameters = new ITypeBinding[typeParameters.length]; for (int i = 0; i < typeParameters.length; i++) { ITypeBinding typeParameter = typeParameters[i]; m_typeParameters[i] = context.get(typeParameter); } } // modifiers m_modifiers = binding.getModifiers(); m_declaredModifiers = binding.getDeclaredModifiers(); // array m_array = binding.isArray(); if (binding.getElementType() != null) { m_elementType = context.get(binding.getElementType()); } else { m_elementType = null; } m_dimensions = binding.getDimensions(); // elements m_declaringClass = context.get(binding.getDeclaringClass()); m_superclass = context.get(binding.getSuperclass(), true); { ITypeBinding[] jdtInterfaces = binding.getInterfaces(); m_interfaces = new ITypeBinding[jdtInterfaces.length]; for (int i = 0; i < jdtInterfaces.length; i++) { ITypeBinding jdtInterface = jdtInterfaces[i]; m_interfaces[i] = context.get(jdtInterface); } } { IMethodBinding[] methods = binding.getDeclaredMethods(); m_declaredMethods = new IMethodBinding[methods.length]; for (int i = 0; i < methods.length; i++) { IMethodBinding method = methods[i]; m_declaredMethods[i] = context.get(method); } } }