Package edu.umd.cs.findbugs.classfile

Examples of edu.umd.cs.findbugs.classfile.FieldDescriptor


     * @param isStatic
     * @return the created XField
     */
    public static XField createXFieldUsingSlashedClassName(@SlashedClassName String className, String fieldName,
            String fieldSignature, boolean isStatic) {
        FieldDescriptor fieldDesc = DescriptorFactory.instance().getFieldDescriptor(className, fieldName, fieldSignature,
                isStatic);

        return createXField(fieldDesc);
    }
View Full Code Here


     * @param fieldSignature
     * @param isStatic
     * @return the created XField
     */
    public static XField createXField(@DottedClassName String className, String fieldName, String fieldSignature, boolean isStatic) {
        FieldDescriptor fieldDesc = DescriptorFactory.instance().getFieldDescriptor(ClassName.toSlashedClassName(className),
                fieldName, fieldSignature, isStatic);

        return createXField(fieldDesc);
    }
View Full Code Here

     *            field access flags
     * @return XField exactly matching class name, field name, and field
     *         signature
     */
    public static XField getExactXField(@SlashedClassName String className, String name, String signature, boolean isStatic) {
        FieldDescriptor fieldDesc = DescriptorFactory.instance().getFieldDescriptor(ClassName.toSlashedClassName(className),
                name, signature, isStatic);
        return getExactXField(fieldDesc);
    }
View Full Code Here

        return getExactXField(fieldDesc);
    }

    public static @Nonnull
    XField getExactXField(@SlashedClassName String className, Field f) {
        FieldDescriptor fd = DescriptorFactory.instance().getFieldDescriptor(className, f);
        return getExactXField(fd);
    }
View Full Code Here

        xFactory.fields.put(desc, m);
        return m;
    }

    private XField resolveXField(FieldDescriptor originalDescriptor) {
        FieldDescriptor desc = originalDescriptor;
        LinkedList<ClassDescriptor> worklist = new LinkedList<ClassDescriptor>();
        ClassDescriptor originalClassDescriptor = desc.getClassDescriptor();
        worklist.add(originalClassDescriptor);
        try {
            while (!worklist.isEmpty()) {
                ClassDescriptor d = worklist.removeFirst();
                if (!d.equals(originalClassDescriptor)) {
                    desc = DescriptorFactory.instance().getFieldDescriptor(d.getClassName(), desc.getName(), desc.getSignature(),
                            desc.isStatic());
                }

                XField f = fields.get(desc);
                if (f != null) {
                    return f;
View Full Code Here

     *
     * @param methodInvoked
     *            TODO
     */
    public IsNullValue markInformationAsComingFromReturnValueOfMethod(XMethod methodInvoked) {
        FieldDescriptor fieldDescriptor = methodInvoked.getAccessMethodForField();
        if (fieldDescriptor != null) {
            XField f = XFactory.getExactXField(fieldDescriptor);
            return markInformationAsComingFromFieldValue(f);
        }

View Full Code Here

     * @param obj
     *            the field to parse
     * @return a descriptor for the field
     */
    protected FieldDescriptor parseField(Field obj) {
        return new FieldDescriptor(slashedClassName, obj.getName(), obj.getSignature(), obj.isStatic());
    }
View Full Code Here

        public void setAccessMethodForMethod(String owner, String name, String sig, boolean isStatic) {
            accessMethodForMethod = new MethodDescriptor(owner, name, sig, isStatic);
        }
        public void setAccessMethodForField(String owner, String name, String sig, boolean isStatic) {
            accessMethodForField = new FieldDescriptor(owner, name, sig, isStatic);
        }
View Full Code Here

                FieldAnnotation field = warning.getPrimaryField();
                if (field != null) {
                    if (DEBUG) {
                        System.out.println("primary field of " + field + " for " + warning);
                    }
                    FieldDescriptor fieldDescriptor = field.toFieldDescriptor();
                    Collection<BugInstance> warnings = warningsByField.get(fieldDescriptor);

                    if (warnings == null) {
                        warnings = new LinkedList<BugInstance>();
                        warningsByField.put(fieldDescriptor, warnings);
View Full Code Here

                        JavaClass bundleClass = Repository.lookupClass("org.osgi.framework.BundleActivator");
                        if (getThisClass().instanceOf(bundleClass)) {
                            priority++;
                        }
                        if (f.isReferenceType()) {
                            FieldDescriptor fieldInfo = f.getFieldDescriptor();
                            String dottedClass = DeepSubtypeAnalysis.getComponentClass(fieldInfo.getSignature());
                            JavaClass fieldClass = Repository.lookupClass(dottedClass);
                            if (fieldClass != null && fieldClass.instanceOf(bundleClass)) {
                                // the code "plugin = this;" unfortunately
                                // exists in the
                                // template for new Eclipse plugin classes, so
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.classfile.FieldDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.