Examples of AnnotationMap


Examples of com.britesnow.snow.util.AnnotationMap

        Class[] paramTypes = method.getParameterTypes();
        Annotation[][] paramAnnotationsArray = method.getParameterAnnotations();
        Object[] values = new Object[paramTypes.length];
        for (int i = 0; i < paramTypes.length ; i++){
            Class paramType = paramTypes[i];
            AnnotationMap annotationMap = new AnnotationMap(paramAnnotationsArray[i]);
            WebParamResolverRef paramResolverRef = paramResolverRefs[i];
           
            Object value = paramResolverRef.invoke(annotationMap, paramType, rc);
           
            values[i] = value;
View Full Code Here

Examples of com.britesnow.snow.util.AnnotationMap

        this.paramType = paramType;
        this.annotations = annotations;
        this.webParamResolverRef = webParamResolverRef;
        this.key = key;
       
        annotationMap = new AnnotationMap(annotations);
        if (annotations != null && annotations.length > 0){
            firstAnnotation = annotations[0];
        }
    }
View Full Code Here

Examples of com.fasterxml.jackson.databind.introspect.AnnotationMap

        // TODO: find and pass wrapper; isRequired marker?
        super(ENDPOINT_NAME, type, /*PropertyName wrapperName*/ null,
                null, null, PropertyMetadata.STD_OPTIONAL);
        boolean hasAnn = (annotations != null && annotations.length > 0);
        if (hasAnn) {
            _annotations = new AnnotationMap();
            for (Annotation a : annotations) {
                _annotations.add(a);
            }
        } else {
            _annotations = NO_ANNOTATIONS;
View Full Code Here

Examples of com.fasterxml.jackson.databind.introspect.AnnotationMap

        super(ENDPOINT_NAME, type, /*PropertyName wrapperName*/ null,
                null, null,
                /* isRequired */ false);
        boolean hasAnn = (annotations == null || annotations.length == 0);
        if (hasAnn) {
            _annotations = new AnnotationMap();
            for (Annotation a : annotations) {
                _annotations.add(a);
            }
        } else {
            _annotations = NO_ANNOTATIONS;
View Full Code Here

Examples of openmods.utils.AnnotationMap

    ImmutableList.Builder<Argument> luaArgs = ImmutableList.builder();
    for (int arg = 0; arg < declaredLuaArgs.length; arg++) {
      boolean isLastArg = arg == (declaredLuaArgs.length - 1);

      AnnotationMap annotations = new AnnotationMap(argsAnnotations[arg]);
      Arg ann = declaredLuaArgs[arg];
      annotations.put(ann);
      int javaArgIndex = luaArgsStart + arg;

      isOptional = checkOptional(isOptional, annotations);

      ArgumentBuilder builder = new ArgumentBuilder();
      builder.setVararg(isLastArg && isVarArg);
      builder.setOptional(isOptional);
      builder.setNullable(ann.isNullable());

      luaArgs.add(createLuaArg(builder, annotations, methodArgs[javaArgIndex], javaArgIndex));
    }

    this.luaArgs = luaArgs.build();
    this.javaArgs = ImmutableList.copyOf(Arrays.copyOf(methodArgs, luaArgsStart));

    for (int arg = 0; arg < luaArgsStart; arg++) {
      AnnotationMap annotations = new AnnotationMap(argsAnnotations[arg]);
      Named named = annotations.get(Named.class);
      if (named != null) namedArgs.put(named.value(), arg);
      Preconditions.checkState(annotations.get(Optionals.class) == null, "@Optionals does not work for java arguments (method %s)", method);
    }
  }
View Full Code Here

Examples of openmods.utils.AnnotationMap

    for (int i = 0; i < methodArgs.length; i++) {
      boolean isLastArg = i == (methodArgs.length - 1);
      final Class<?> cls = methodArgs[i];

      AnnotationMap annotations = new AnnotationMap(argsAnnotations[i]);

      boolean isLuaArg = false;

      Arg tmp = annotations.get(Arg.class);
      if (tmp != null) {
        isOptional = checkOptional(isOptional, annotations);

        ArgumentBuilder builder = new ArgumentBuilder();
        builder.setVararg(isLastArg && isVarArg);
        builder.setOptional(isOptional);
        builder.setNullable(tmp.isNullable());

        luaArgs.add(createLuaArg(builder, annotations, cls, i));

        isLuaArg = true;
        isInLuaArgs = true;
      }

      Preconditions.checkState(!isInLuaArgs || isLuaArg, "Argument %s in method %s look like Java arg, but is in Lua part (perhaps missing Arg annotation?)", i, method);

      Named named = annotations.get(Named.class);
      if (named != null) {
        Preconditions.checkState(!isInLuaArgs, "Argument %s in method %s is Lua arg, but has Named annotation", i, method);
        namedArgs.put(named.value(), i);
      }

      Preconditions.checkState(isInLuaArgs || annotations.get(Optionals.class) == null, "@Optionals does not work for java arguments (method %s)", method);

      if (!isLuaArg) javaArgs.add(cls);
    }

    this.luaArgs = luaArgs.build();
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.annotation.AnnotationMap

   * @return AnnotationMap
   */
  private AnnotationMap getAnnotationMap() {
    // create a new annotation map and load it up
    if (fAnnotationMap == null) {
      fAnnotationMap = new AnnotationMap();
     
      List annotationFiles = ContentModelManager.getInstance().getAnnotationFilesInfos(getUri());
        for (Iterator i = annotationFiles.iterator(); i.hasNext();) {
          try {
            AnnotationFileInfo fileInfo = (AnnotationFileInfo) i.next();
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.annotation.AnnotationMap

   *
   * @return String taginfo if it exists, null otherwise
   */
  private String getTagInfo() {
    if (getOwnerDocument().supports("annotationMap")) { //$NON-NLS-1$
      AnnotationMap map = (AnnotationMap) getOwnerDocument().getProperty("annotationMap"); //$NON-NLS-1$
      String spec = getSpec();
      String result = map.getProperty(spec, "tagInfo"); //$NON-NLS-1$
      return result;
      // bug88336 no need to restore markers
      // return StringUtils.restoreMarkers(result); // return tag info
    }
    return null;
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.annotation.AnnotationMap

     * Gets the annotationMap.
     * @return Returns a AnnotationMap
     */
    protected AnnotationMap getAnnotationMap() {
      if (fAnnotationMap == null) {
        fAnnotationMap = new AnnotationMap();
        try {
          fAnnotationMap.load(htmlAnnotationLoc, HTMLCorePlugin.getDefault().getBundle().getSymbolicName());
        }
        catch (Exception e) {
          // no annotation available
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.annotation.AnnotationMap

     * Gets the annotationMap.
     * @return Returns a AnnotationMap
     */
    protected AnnotationMap getAnnotationMap() {
      if (fAnnotationMap == null) {
        fAnnotationMap = new AnnotationMap();
        try {
          fAnnotationMap.load(htmlAnnotationLoc, HTMLCorePlugin.getDefault().getBundle().getSymbolicName());
        }
        catch (Exception e) {
          // no annotation available
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.