Package javax.annotation.meta

Examples of javax.annotation.meta.When


    private void modelFieldStore(Location location) throws DataflowAnalysisException {
        // Model field stores
        XField writtenField = XFactory.createXField((FieldInstruction) location.getHandle().getInstruction(), cpg);
        TypeQualifierAnnotation tqa = TypeQualifierApplications.getEffectiveTypeQualifierAnnotation(writtenField,
                typeQualifierValue);
        When when = (tqa != null) ? tqa.when : When.UNKNOWN;

        // The ValueNumberFrame *before* the FieldInstruction should
        // have the ValueNumber of the stored value on the top of the stack.
        ValueNumberFrame vnaFrameAtStore = vnaDataflow.getFactAtLocation(location);
        if (vnaFrameAtStore.isValid()) {
View Full Code Here


                if (tqa != null) {
                    interproc = true;
                }
            }

            When when = (tqa != null) ? tqa.when : When.UNKNOWN;

            ValueNumber vn = vnaFrame.getArgument(inv, cpg, param, sigParser);

            SourceSinkInfo info = new SourceSinkInfo(SourceSinkType.ARGUMENT_TO_CALLED_METHOD, location, vn, when);
            info.setParameter(param);
View Full Code Here

    private static TypeQualifierAnnotation combineAnnotations(TypeQualifierAnnotation a, TypeQualifierAnnotation b,
            When[][] mergeMatrix) {
        assert a.typeQualifier.equals(b.typeQualifier);

        When aWhen = a.when;
        When bWhen = b.when;
        if (aWhen.ordinal() < bWhen.ordinal()) {
            When tmp = aWhen;
            aWhen = bWhen;
            bWhen = tmp;
        }

        When combined = mergeMatrix[aWhen.ordinal()][bWhen.ordinal()];
        if (combined != null) {
            return getValue(a.typeQualifier, combined);
        } else {
            return null;
        }
View Full Code Here

     * @return a constructed TypeQualifierAnnotation
     */
    public static TypeQualifierAnnotation constructTypeQualifierAnnotation(AnnotationValue v) {
        assert v != null;
        EnumValue whenValue = (EnumValue) v.getValue("when");
        When when = whenValue == null ? When.ALWAYS : When.valueOf(whenValue.value);
        ClassDescriptor annotationClass = v.getAnnotationClass();
        TypeQualifierValue<?> tqv = TypeQualifierValue.getValue(annotationClass, v.getValue("value"));
        TypeQualifierAnnotation tqa = TypeQualifierAnnotation.getValue(tqv, when);
        return tqa;
    }
View Full Code Here

    private void registerPushNullSource(Location location) throws DataflowAnalysisException {
        registerConstantSource(location, null);
    }
    private void registerConstantSource(Location location,  @CheckForNull Object constantValue) throws DataflowAnalysisException {

        When w;
        if (typeQualifierValue.canValidate(constantValue)) {
            w = typeQualifierValue.validate(constantValue);
        } else if (typeQualifierValue.isStrictQualifier()) {
            return;
        } else {
View Full Code Here

                if (tqa != null) {
                    interproc = true;
                }
            }

            When when = (tqa != null) ? tqa.when : When.UNKNOWN;
            registerTopOfStackSource(SourceSinkType.RETURN_VALUE_OF_CALLED_METHOD, location, when, interproc, null);
        }
    }
View Full Code Here

    private void registerFieldLoadSource(Location location) throws DataflowAnalysisException {
        XField loadedField = XFactory.createXField((FieldInstruction) location.getHandle().getInstruction(), cpg);
        if (loadedField.isResolved()) {
            TypeQualifierAnnotation tqa = TypeQualifierApplications.getEffectiveTypeQualifierAnnotation(loadedField,
                    typeQualifierValue);
            When when = (tqa != null) ? tqa.when : When.UNKNOWN;
            registerTopOfStackSource(SourceSinkType.FIELD_LOAD, location, when, false, null);
        }

    }
View Full Code Here

            // Get the TypeQualifierAnnotation for this parameter
            SourceSinkInfo info;
            TypeQualifierAnnotation tqa = TypeQualifierApplications.getEffectiveTypeQualifierAnnotation(xmethod, param,
                    typeQualifierValue);
            When when = (tqa != null) ? tqa.when : When.UNKNOWN;
            ValueNumber vn = vnaFrameAtEntry.getValue(slotOffset + firstParamSlot);
            info = new SourceSinkInfo(SourceSinkType.PARAMETER, cfg.getLocationAtEntry(), vn, when);
            info.setParameterAndLocal(param, slotOffset + firstParamSlot);
            registerSourceSink(info);
View Full Code Here

            performingValidation.set(Boolean.TRUE);
            if (TypeQualifierValue.DEBUG_CLASSLOADING) {
                System.out.println("Performing validation in thread " + Thread.currentThread().getName());
            }
            try {
                When result = v.forConstantValue(proxy, constantValue);
                if (!performingValidation.get()) {
                    throw new IllegalStateException("performingValidation not set when validation completes");
                }
                return result;
            } catch (ClassCastException e) {
View Full Code Here

TOP

Related Classes of javax.annotation.meta.When

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.