Examples of ElementValuePair


Examples of com.sun.javadoc.AnnotationDesc.ElementValuePair

            return;

        // Events has only a single attribute: value(), so we know its the first element
        // in the array.

        ElementValuePair pair = eventsAnnotation.elementValues()[0];

        AnnotationValue annotationValue = pair.value();
        AnnotationValue[] values = (AnnotationValue[]) annotationValue.value();

        for (AnnotationValue eventValue : values)
        {
            String event = (String) eventValue.value();
View Full Code Here

Examples of com.sun.javadoc.AnnotationDesc.ElementValuePair

                }

                // Events has only a single attribute: value(), so we know its the first element
                // in the array.

                ElementValuePair pair = annotation.elementValues()[0];

                AnnotationValue annotationValue = pair.value();
                AnnotationValue[] values = (AnnotationValue[]) annotationValue.value();


                for (AnnotationValue eventValue : values)
                {
View Full Code Here

Examples of com.sun.javadoc.AnnotationDesc.ElementValuePair

  public String getWrapperName() {
    return wrapperName;
  }
 
  public boolean isNillable(){
    ElementValuePair elementValuePair = getElementAttribute("nillable");
    if(elementValuePair != null){
      return "true".equalsIgnoreCase(elementValuePair.value().toString());
    }
    return false;
  }
View Full Code Here

Examples of com.sun.javadoc.AnnotationDesc.ElementValuePair

    }
    return false;
  }
 
  public String getDefaultValue(){
    ElementValuePair elementValuePair = getElementAttribute("defaultValue");
    if(elementValuePair != null){
      return elementValuePair.value().toString();
    }
    return "";
  }
View Full Code Here

Examples of com.sun.javadoc.AnnotationDesc.ElementValuePair

  protected Node(JAXBClass klass, ProgramElementDoc property, String name, AnnotationDesc xmlAttributeAnnotation) {
    super(klass, property, name, xmlAttributeAnnotation);
  }
 
  public boolean isRequired(){
    ElementValuePair elementValuePair = getElementAttribute("required");
    if(elementValuePair != null){
      return "true".equalsIgnoreCase(elementValuePair.value().toString());
    }
    return false;
  }
View Full Code Here

Examples of com.sun.javadoc.AnnotationDesc.ElementValuePair

                }

                // Events has only a single attribute: value(), so we know its the first element
                // in the array.

                ElementValuePair pair = annotation.elementValues()[0];

                AnnotationValue annotationValue = pair.value();
                AnnotationValue[] values = (AnnotationValue[]) annotationValue.value();

                for (AnnotationValue eventValue : values)
                {
                    String event = (String) eventValue.value();
View Full Code Here

Examples of org.apache.bcel.classfile.ElementValuePair

  {
    List<ElementValuePairGen> out = new ArrayList<ElementValuePairGen>();
    int l = in.length;
    for (int i = 0; i < l; i++)
    {
      ElementValuePair nvp = in[i];
      out.add(new ElementValuePairGen(nvp, cpool, copyPoolEntries));
    }
    return out;
  }
View Full Code Here

Examples of org.apache.bcel.classfile.ElementValuePair

          if (entry.getElementValuePairs().length == 0)
            result.put(Type.getType(entry.getAnnotationType()) + "# ", " ");

          for (int i= 0; i < entry.getElementValuePairs().length; i++)
          {
            ElementValuePair elementValuePair= entry.getElementValuePairs()[i];
            result.put(Type.getType(entry.getAnnotationType()) + "#" + elementValuePair.getNameString(), elementValuePair.getValue().toString());
          }
        }
      }
    }
    return result;
View Full Code Here

Examples of org.apache.bcel.classfile.ElementValuePair

   * Retrieve an immutable version of this ElementNameValuePairGen
   */
  public ElementValuePair getElementNameValuePair()
  {
    ElementValue immutableValue = value.getElementValue();
    return new ElementValuePair(nameIdx, immutableValue, cpool
        .getConstantPool());
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ElementValuePair

  }
 
  public void resolveTypeExpecting(BlockScope scope, TypeBinding requiredType) {
   
    if (this.value == null) {
      this.compilerElementPair = new ElementValuePair(this.name, this.value, this.binding);
      return;
    }
    if (requiredType == null) {
      // fault tolerance: keep resolving
      if (this.value instanceof ArrayInitializer) {
        this.value.resolveTypeExpecting(scope, null);
      } else {
        this.value.resolveType(scope);
      }
      this.compilerElementPair = new ElementValuePair(this.name, this.value, this.binding);
      return;
    }

    this.value.setExpectedType(requiredType); // needed in case of generic method invocation
    TypeBinding valueType;
    if (this.value instanceof ArrayInitializer) {
      ArrayInitializer initializer = (ArrayInitializer) this.value;
      valueType = initializer.resolveTypeExpecting(scope, this.binding.returnType);
    } else if (this.value instanceof ArrayAllocationExpression) {
      scope.problemReporter().annotationValueMustBeArrayInitializer(this.binding.declaringClass, this.name, this.value);
      this.value.resolveType(scope);
      valueType = null; // no need to pursue
    } else {
      valueType = this.value.resolveType(scope);
    }
    this.compilerElementPair = new ElementValuePair(this.name, this.value, this.binding);
    if (valueType == null)
      return;

    TypeBinding leafType = requiredType.leafComponentType();
    if (!((this.value.isConstantValueOfTypeAssignableToType(valueType, requiredType)
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.