Examples of EnumValue


Examples of com.avaje.ebean.annotation.EnumValue

    Map<String, String> nameValueMap = new HashMap<String, String>();

    Field[] fields = enumType.getDeclaredFields();
    for (int i = 0; i < fields.length; i++) {
      EnumValue enumValue = fields[i].getAnnotation(EnumValue.class);
      if (enumValue != null) {
        nameValueMap.put(fields[i].getName(), enumValue.value());
        if (integerType && !isIntegerType(enumValue.value())) {
          // will treat the values as strings
          integerType = false;
        }
      }
    }
View Full Code Here

Examples of edu.umd.cs.findbugs.classfile.analysis.EnumValue

     *            a raw AnnotationValue
     * @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

Examples of edu.umd.cs.findbugs.classfile.analysis.EnumValue

            if (defaultAnnotation == null) {
                return;
            }
            for (Object o : (Object[]) defaultAnnotation.getValue("value")) {
                if (o instanceof EnumValue) {
                    EnumValue e = (EnumValue) o;
                    if (e.desc.equals(elementTypeDescriptor) && e.value.equals(defaultFor.name())) {
                        for (ClassDescriptor d : c.getAnnotationDescriptors()) {
                            if (!d.equals(typeQualifierDefault)) {
                                resolveTypeQualifierNicknames(c.getAnnotation(d), result, new LinkedList<ClassDescriptor>());
                            }
View Full Code Here

Examples of edu.umd.cs.findbugs.classfile.analysis.EnumValue

            Collection<BugInstance> warnings, boolean expectWarnings, int priority, ClassDescriptor cd) {

        if (expect != null) {

            String expectedBugCodes = (String) expect.getValue("value");
            EnumValue wantedConfidence = (EnumValue) expect.getValue("confidence");
            EnumValue wantedPriority = (EnumValue) expect.getValue("priority");
            Integer num = (Integer) expect.getValue("num");
            if (num == null) {
                num = (expectWarnings ? 1 : 0);
            }
            Integer rank = (Integer) expect.getValue("rank");
View Full Code Here

Examples of net.sf.rej.java.attribute.annotations.EnumValue

        sd.drawDefault(ia.getShortName(ev.getValue()));
      } else if (ev instanceof ConstantValue) {
        ConstantValue cv = (ConstantValue)ev;
        drawConstant(sd, cv.getConstantPoolInfo());
      } else if (ev instanceof EnumValue) {
        EnumValue en = (EnumValue)ev;
        sd.drawDefault(ia.getShortName(en.getTypeName()));
        sd.drawDefault(".");
        sd.drawField(en.getConstName());
      } else if (ev instanceof NestedAnnotationValue) {
        sd.drawDefault(ev.getValue());
      }
    }
View Full Code Here

Examples of net.sf.rej.java.attribute.annotations.EnumValue

      } else if (ev instanceof ClassInfoValue) {
        imports.addType(ev.getValue());
      } else if (ev instanceof ConstantValue) {
        // no types
      } else if (ev instanceof EnumValue) {
        EnumValue en = (EnumValue)ev;
        imports.addType(en.getTypeName());
      } else if (ev instanceof NestedAnnotationValue) {
        NestedAnnotationValue nested = (NestedAnnotationValue)ev;
        getAnnotationTypeImports(imports, nested.getAnnotation());
      }
    }
View Full Code Here

Examples of org.apache.axis2.corba.idl.values.EnumValue

        } else if (dataType instanceof EnumType) {
            EnumType enumType = (EnumType) dataType;
            String enumText = ((OMElement) param).getText();
            int index = enumType.getEnumMembers().indexOf(enumText);
            if (index >= 0) {
                EnumValue enumValue = new EnumValue(enumType);
                enumValue.setValue(index);
                return enumValue;
            }
        } else if (dataType instanceof UnionType) {
            UnionType unionType = (UnionType) dataType;
            OMElement unElement = ((OMElement) param).getFirstElement();
View Full Code Here

Examples of org.apache.axis2.corba.idl.values.EnumValue

                unMember = fac.createOMElement(unionValue.getMemberName(), null);
            }
            processResponse(unMember, child, unionValue.getMemberValue(), unionValue.getMemberType(), fac, ns, qualified, service);
            child.addChild(unMember);
        } else if (dataType instanceof EnumType) {
            EnumValue enumValue = (EnumValue) resObject;
            child.addChild(fac.createOMText(child, enumValue.getValueAsString()));
        }
    }
View Full Code Here

Examples of org.apache.axis2.corba.idl.values.EnumValue

                arg.type(structValue.getTypeCode());
                structValue.write(outputStream);
                arg.read_value(outputStream.create_input_stream (), structValue.getTypeCode());
                break;
            case TCKind._tk_enum:
                EnumValue enumValue = (EnumValue) value;
                outputStream = (org.omg.CORBA_2_3.portable.OutputStream) arg.create_output_stream();
                arg.type(enumValue.getTypeCode());
                enumValue.write(outputStream);
                arg.read_value(outputStream.create_input_stream (), enumValue.getTypeCode());
                break;
            case TCKind._tk_union:
                UnionValue unionValue = (UnionValue) value;
                outputStream = (org.omg.CORBA_2_3.portable.OutputStream) arg.create_output_stream();
                arg.type(unionValue.getTypeCode());
View Full Code Here

Examples of org.apache.axis2.corba.idl.values.EnumValue

                exceptionValue.read(inputStream);
                returnValue = exceptionValue;
                break;
            case TCKind._tk_enum:
                EnumType enumType = (EnumType) returnType;
                EnumValue enumValue = new EnumValue(enumType);
                inputStream = (org.omg.CORBA_2_3.portable.InputStream) returned.create_input_stream();
                enumValue.read(inputStream);
                returnValue = enumValue;
                break;
            case TCKind._tk_union:
                UnionType unionType = (UnionType) returnType;
                inputStream = (org.omg.CORBA_2_3.portable.InputStream) returned.create_input_stream();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.