kinds.append(" (non-generic, non-parametrized)");
kinds.append(" (non-generic, non-parameterized)");
	public Object[] getChildren() {				if (fBinding != null) {			ArrayList res= new ArrayList();			res.add(new BindingProperty(this, "NAME", fBinding.getName(), true)); //$NON-NLS-1$			res.add(new BindingProperty(this, "KEY", fBinding.getKey(), true)); //$NON-NLS-1$			switch (fBinding.getKind()) {				case IBinding.VARIABLE:					IVariableBinding variableBinding= (IVariableBinding) fBinding;					res.add(new BindingProperty(this, "IS FIELD", variableBinding.isField(), true)); //$NON-NLS-1$					res.add(new BindingProperty(this, "IS ENUM CONSTANT", variableBinding.isEnumConstant(), true)); //$NON-NLS-1$					res.add(new BindingProperty(this, "IS PARAMETER", variableBinding.isParameter(), true)); //$NON-NLS-1$					res.add(new BindingProperty(this, "VARIABLE ID", variableBinding.getVariableId(), true)); //$NON-NLS-1$					res.add(new BindingProperty(this, "MODIFIERS", Flags.toString(fBinding.getModifiers()), true)); //$NON-NLS-1$					res.add(new Binding(this, "TYPE", variableBinding.getType(), true)); //$NON-NLS-1$					res.add(new Binding(this, "DECLARING CLASS", variableBinding.getDeclaringClass(), true)); //$NON-NLS-1$					res.add(new Binding(this, "DECLARING METHOD", variableBinding.getDeclaringMethod(), true)); //$NON-NLS-1$					res.add(new Binding(this, "VARIABLE DECLARATION", variableBinding.getVariableDeclaration(), true)); //$NON-NLS-1$					res.add(new BindingProperty(this, "IS SYNTHETIC", fBinding.isSynthetic(), true)); //$NON-NLS-1$					res.add(new BindingProperty(this, "IS DEPRECATED", fBinding.isDeprecated(), true)); //$NON-NLS-1$					Object constVal= variableBinding.getConstantValue();					res.add(new BindingProperty(this, "CONSTANT VALUE", constVal == null ? "null" : constVal.toString(), true)); //$NON-NLS-1$ //$NON-NLS-2$					break;									case IBinding.PACKAGE:					IPackageBinding packageBinding= (IPackageBinding) fBinding;					res.add(new BindingProperty(this, "IS UNNAMED", packageBinding.isUnnamed(), true)); //$NON-NLS-1$					res.add(new BindingProperty(this, "IS SYNTHETIC", fBinding.isSynthetic(), true)); //$NON-NLS-1$					res.add(new BindingProperty(this, "IS DEPRECATED", fBinding.isDeprecated(), true)); //$NON-NLS-1$					break;									case IBinding.TYPE:					ITypeBinding typeBinding= (ITypeBinding) fBinding;					int typeKind= getTypeKind(typeBinding);										boolean isRefType= isType(typeKind, REF_TYPE);					final boolean isNonPrimitive= ! isType(typeKind, PRIMITIVE_TYPE);										StringBuffer kinds= new StringBuffer("KIND:"); //$NON-NLS-1$					if (typeBinding.isArray()) kinds.append(" isArray"); //$NON-NLS-1$					if (typeBinding.isCapture()) kinds.append(" isCapture"); //$NON-NLS-1$					if (typeBinding.isNullType()) kinds.append(" isNullType"); //$NON-NLS-1$					if (typeBinding.isPrimitive()) kinds.append(" isPrimitive"); //$NON-NLS-1$					if (typeBinding.isTypeVariable()) kinds.append(" isTypeVariable"); //$NON-NLS-1$					if (typeBinding.isWildcardType()) kinds.append(" isWildcardType"); //$NON-NLS-1$					// ref types					if (typeBinding.isAnnotation()) kinds.append(" isAnnotation"); //$NON-NLS-1$					if (typeBinding.isClass()) kinds.append(" isClass"); //$NON-NLS-1$					if (typeBinding.isInterface()) kinds.append(" isInterface"); //$NON-NLS-1$					if (typeBinding.isEnum()) kinds.append(" isEnum"); //$NON-NLS-1$					res.add(new BindingProperty(this, kinds, true)); //$NON-NLS-1$										kinds= new StringBuffer("GENERICS:"); //$NON-NLS-1$					if (typeBinding.isRawType()) kinds.append(" isRawType"); //$NON-NLS-1$					if (typeBinding.isGenericType()) kinds.append(" isGenericType"); //$NON-NLS-1$					if (typeBinding.isParameterizedType()) kinds.append(" isParameterizedType"); //$NON-NLS-1$					if (!isType(typeKind, GENERIC | PARAMETRIZED)) {						kinds.append(" (non-generic, non-parametrized)");					}										res.add(new BindingProperty(this, kinds, isRefType)); //$NON-NLS-1$					res.add(new Binding(this, "ELEMENT TYPE", typeBinding.getElementType(), isType(typeKind, ARRAY_TYPE))); //$NON-NLS-1$					res.add(new Binding(this, "COMPONENT TYPE", typeBinding.getComponentType(), isType(typeKind, ARRAY_TYPE))); //$NON-NLS-1$					res.add(new BindingProperty(this, "DIMENSIONS", typeBinding.getDimensions(), isType(typeKind, ARRAY_TYPE))); //$NON-NLS-1$										res.add(new BindingProperty(this, "TYPE BOUNDS", typeBinding.getTypeBounds(), isType(typeKind, VARIABLE_TYPE | CAPTURE_TYPE))); //$NON-NLS-1$										StringBuffer origin= new StringBuffer("ORIGIN:"); //$NON-NLS-1$					if (typeBinding.isTopLevel()) origin.append(" isTopLevel"); //$NON-NLS-1$					if (typeBinding.isNested()) origin.append(" isNested"); //$NON-NLS-1$					if (typeBinding.isLocal()) origin.append(" isLocal"); //$NON-NLS-1$					if (typeBinding.isMember()) origin.append(" isMember"); //$NON-NLS-1$					if (typeBinding.isAnonymous()) kinds.append(" isAnonymous"); //$NON-NLS-1$					res.add(new BindingProperty(this, origin, isRefType));										res.add(new BindingProperty(this, "IS FROM SOURCE", typeBinding.isFromSource(), isType(typeKind, REF_TYPE | VARIABLE_TYPE | CAPTURE_TYPE))); //$NON-NLS-1$					res.add(new Binding(this, "PACKAGE", typeBinding.getPackage(), isRefType)); //$NON-NLS-1$					res.add(new Binding(this, "DECLARING CLASS", typeBinding.getDeclaringClass(), isType(typeKind, REF_TYPE | VARIABLE_TYPE | CAPTURE_TYPE))); //$NON-NLS-1$					res.add(new Binding(this, "DECLARING METHOD", typeBinding.getDeclaringMethod(), isType(typeKind, REF_TYPE | VARIABLE_TYPE | CAPTURE_TYPE))); //$NON-NLS-1$					res.add(new BindingProperty(this, "MODIFIERS", Flags.toString(fBinding.getModifiers()), isRefType)); //$NON-NLS-1$					res.add(new BindingProperty(this, "BINARY NAME", typeBinding.getBinaryName(), true)); //$NON-NLS-1$										res.add(new Binding(this, "TYPE DECLARATION", typeBinding.getTypeDeclaration(), isNonPrimitive)); //$NON-NLS-1$					res.add(new Binding(this, "ERASURE", typeBinding.getErasure(), isNonPrimitive)); //$NON-NLS-1$					res.add(new BindingProperty(this, "TYPE PARAMETERS", typeBinding.getTypeParameters(), isType(typeKind, GENERIC))); //$NON-NLS-1$					res.add(new BindingProperty(this, "TYPE ARGUMENTS", typeBinding.getTypeArguments(), isType(typeKind, PARAMETRIZED))); //$NON-NLS-1$					res.add(new Binding(this, "BOUND", typeBinding.getBound(), isType(typeKind, WILDCARD_TYPE))); //$NON-NLS-1$					res.add(new BindingProperty(this, "IS UPPERBOUND", typeBinding.isUpperbound(), isType(typeKind, WILDCARD_TYPE))); //$NON-NLS-1$					res.add(new Binding(this, "WILDCARD", typeBinding.getWildcard(), isType(typeKind, CAPTURE_TYPE))); //$NON-NLS-1$					res.add(new Binding(this, "SUPERCLASS", typeBinding.getSuperclass(), isRefType)); //$NON-NLS-1$					res.add(new BindingProperty(this, "INTERFACES", typeBinding.getInterfaces(), isRefType)); //$NON-NLS-1$								res.add(new BindingProperty(this, "DECLARED TYPES", typeBinding.getDeclaredTypes(), isRefType)); //$NON-NLS-1$								res.add(new BindingProperty(this, "DECLARED FIELDS", typeBinding.getDeclaredFields(), isRefType)); //$NON-NLS-1$								res.add(new BindingProperty(this, "DECLARED METHODS", typeBinding.getDeclaredMethods(), isRefType)); //$NON-NLS-1$								res.add(new BindingProperty(this, "IS SYNTHETIC", fBinding.isSynthetic(), isNonPrimitive)); //$NON-NLS-1$					res.add(new BindingProperty(this, "IS DEPRECATED", fBinding.isDeprecated(), isRefType)); //$NON-NLS-1$					break;									case IBinding.METHOD:					IMethodBinding methodBinding= (IMethodBinding) fBinding;					res.add(new BindingProperty(this, "IS CONSTRUCTOR", methodBinding.isConstructor(), true)); //$NON-NLS-1$					res.add(new BindingProperty(this, "IS DEFAULT CONSTRUCTOR", methodBinding.isDefaultConstructor(), true)); //$NON-NLS-1$					res.add(new Binding(this, "DECLARING CLASS", methodBinding.getDeclaringClass(), true)); //$NON-NLS-1$					res.add(new Binding(this, "RETURN TYPE", methodBinding.getReturnType(), true)); //$NON-NLS-1$					res.add(new BindingProperty(this, "MODIFIERS", Flags.toString(fBinding.getModifiers()), true)); //$NON-NLS-1$					res.add(new BindingProperty(this, "PARAMETER TYPES", methodBinding.getParameterTypes(), true)); //$NON-NLS-1$					res.add(new BindingProperty(this, "IS VARARGS", methodBinding.isVarargs(), true)); //$NON-NLS-1$					res.add(new BindingProperty(this, "EXCEPTION TYPES", methodBinding.getExceptionTypes(), true)); //$NON-NLS-1$										StringBuffer genericsM= new StringBuffer("GENERICS:"); //$NON-NLS-1$					if (methodBinding.isRawMethod()) genericsM.append(" isRawMethod"); //$NON-NLS-1$					if (methodBinding.isGenericMethod()) genericsM.append(" isGenericMethod"); //$NON-NLS-1$					if (methodBinding.isParameterizedMethod()) genericsM.append(" isParameterizedMethod"); //$NON-NLS-1$					res.add(new BindingProperty(this, genericsM, true));										res.add(new Binding(this, "METHOD DECLARATION", methodBinding.getMethodDeclaration(), true)); //$NON-NLS-1$					res.add(new BindingProperty(this, "TYPE PARAMETERS", methodBinding.getTypeParameters(), true)); //$NON-NLS-1$					res.add(new BindingProperty(this, "TYPE ARGUMENTS", methodBinding.getTypeArguments(), true)); //$NON-NLS-1$								res.add(new BindingProperty(this, "IS SYNTHETIC", fBinding.isSynthetic(), true)); //$NON-NLS-1$					res.add(new BindingProperty(this, "IS DEPRECATED", fBinding.isDeprecated(), true)); //$NON-NLS-1$										res.add(new BindingProperty(this, "IS ANNOTATION MEMBER", methodBinding.isAnnotationMember(), true)); //$NON-NLS-1$					res.add(Binding.createValueAttribute(this, "DEFAULT VALUE", methodBinding.getDefaultValue()));										int parameterCount= methodBinding.getParameterTypes().length;					GeneralAttribute[] parametersAnnotations= new GeneralAttribute[parameterCount];					for (int i= 0; i < parameterCount; i++) {						parametersAnnotations[i]= new GeneralAttribute(this, "Parameter " + String.valueOf(i), methodBinding.getParameterAnnotations(i));					}					res.add(new GeneralAttribute(this, "PARAMETER ANNOTATIONS", parametersAnnotations));					break;									case IBinding.ANNOTATION:					IAnnotationBinding annotationBinding= (IAnnotationBinding) fBinding;					res.add(new Binding(this, "ANNOTATION TYPE", annotationBinding.getAnnotationType(), true));					res.add(new BindingProperty(this, "DECLARED MEMBER VALUE PAIRS", annotationBinding.getDeclaredMemberValuePairs(), true));					res.add(new BindingProperty(this, "ALL MEMBER VALUE PAIRS", annotationBinding.getAllMemberValuePairs(), true));					break;									case IBinding.MEMBER_VALUE_PAIR:					IMemberValuePairBinding memberValuePairBinding= (IMemberValuePairBinding) fBinding;					res.add(new Binding(this, "METHOD BINDING", memberValuePairBinding.getMethodBinding(), true));					res.add(new BindingProperty(this, "IS DEFAULT", memberValuePairBinding.isDefault(), true));					res.add(Binding.createValueAttribute(this, "VALUE", memberValuePairBinding.getValue()));					break;			}			try {				IAnnotationBinding[] annotations= fBinding.getAnnotations();				res.add(new BindingProperty(this, "ANNOTATIONS", annotations, true)); //$NON-NLS-1$			} catch (RuntimeException e) {				String label= "Error in IBinding#getAnnotations() for \"" + fBinding.getKey() + "\"";				res.add(new Error(this, label, e));				ASTViewPlugin.log("Exception thrown in IBinding#getAnnotations() for \"" + fBinding.getKey() + "\"", e);			}			try {				IJavaElement javaElement= fBinding.getJavaElement();				res.add(new JavaElement(this, javaElement));			} catch (RuntimeException e) {				String label= ">java element: " + e.getClass().getName() + " for \"" + fBinding.getKey() + "\"";  //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$				res.add(new Error(this, label, e));			}			return res.toArray();		}		return EMPTY;	}