Add an annotation about a parameter

@param index parameter index, starting from 0

@param role the role used to describe the parameter
177253
@Nonnull
    public BugInstance addParameterAnnotation(int index, String role) {
        return addInt(index + 1).describe(role);
    }
570815
public void insertItem (T item, int index, String label)
    {
        insertItem(label == null ? toLabel(item) : label, index);
        _items.add(index, item);
    }
1079460
public void setRoles(java.util.Collection<Role> roles) {
        if (roles == null) {
            this.roles = null;
            return;
        }

        this.roles = new com.amazonaws.internal.SdkInternalList<Role>(roles);
    }
684301
public final void setItsRole(final RoleJetty pRole) {
    this.itsRole = pRole;
    if (this.itsId == null) {
      this.itsId = new IdUserRoleJetty();
    }
    this.itsId.setItsRole(this.itsRole);
  }
1069800
public void addToMethod(DexMaker dexMaker, MethodId<?, ?> method) {
        if (annotatedElement != ElementType.METHOD) {
            throw new IllegalStateException("This annotation is not for method");
        }

        if (!method.declaringType.equals(declaringType)) {
            throw new IllegalArgumentException("Method" + method + "'s declaring type is inconsistent with" + this);
        }

        ClassDefItem classDefItem = dexMaker.getTypeDeclaration(declaringType).toClassDefItem();

        if (classDefItem == null) {
            throw new NullPointerException("No class defined item is found");
        } else {
            CstMethodRef cstMethodRef = method.constant;

            if (cstMethodRef == null) {
                throw new NullPointerException("Method reference is NULL");
            } else {
                // Generate CstType
                CstType cstType = CstType.intern(type.ropType);

                // Generate Annotation
                Annotation annotation = new Annotation(cstType, AnnotationVisibility.RUNTIME);

                // Add generated annotation
                Annotations annotations = new Annotations();
                for (NameValuePair nvp : elements.values()) {
                    annotation.add(nvp);
                }
                annotations.add(annotation);
                classDefItem.addMethodAnnotations(cstMethodRef, annotations, dexMaker.getDexFile());
            }
        }
    }
1125452
@Override
    public void add(int index, Object element) {
        rewrite |= index < delegate.size();

        delegate.add(index, element);
    }
1334264
public void addNamedParameter(String parameterName, int startIndex, int endIndex) {
		delegate.addNamedParameter(parameterName, startIndex, endIndex);
	}
369115
@Override
	public Void visitAnnotation(AnnotationMirror a, String p) {
		if (AnnotationAttributeType.INDEXES.getValue().equals(p)) {
			inTasks = true;
		}

		if (inTasks) {
			currentValue = new Pair<List<String>, Boolean>(new ArrayList<String>(), false);
			for (Map.Entry<? extends ExecutableElement, ? extends AnnotationValue> entry : a.getElementValues().entrySet()) {
				String key = entry.getKey().getSimpleName().toString();
				entry.getValue().accept(this, key);
			}
			indexes.add(currentValue);
		}

		if (AnnotationAttributeType.INDEXES.getValue().equals(p)) {
			inTasks = false;
		}

		return null;
	}
1260450
public Request<Role> update(String roleId, Role role) {
    Asserts.assertNotNull(roleId, "role id");
    Asserts.assertNotNull(role, "role");

    String url = baseUrl
        .newBuilder()
        .addEncodedPathSegments("api/v2/roles")
        .addEncodedPathSegments(roleId)
        .build()
        .toString();
    CustomRequest<Role> request = new CustomRequest<>(this.client, url, "PATCH", new TypeReference<Role>() {});
    request.addHeader("Authorization", "Bearer " + apiToken);
    request.setBody(role);
    return request;
  }
1063581
public function addRole(Role $role)
    {
        if ($role->isAbstract()) {
            throw new \InvalidArgumentException(sprintf('Abstract roles can\'t be assigned to accounts directly, but the role "%s" is marked abstract', $role->getIdentifier()), 1399900657);
        }
        $this->initializeRoles();
        if (!$this->hasRole($role)) {
            $roleIdentifier = $role->getIdentifier();
            $this->roleIdentifiers[] = $roleIdentifier;
            $this->roles[$roleIdentifier] = $role;
        }
    }
993416
private void init(List<CmsRole> roles) {

        CmsRole.applySystemRoleOrder(roles);
        m_menu = new CmsContextMenu();
        m_menu.setAsTableContextMenu(this);

        m_container = new IndexedContainer();

        for (TableProperty prop : TableProperty.values()) {
            m_container.addContainerProperty(prop, prop.getType(), prop.getDefault());
            setColumnHeader(prop, prop.getName());
        }
        setContainerDataSource(m_container);
        setItemIconPropertyId(TableProperty.Icon);
        setRowHeaderMode(RowHeaderMode.ICON_ONLY);

        setColumnWidth(null, 40);
        setSelectable(true);

        setVisibleColumns(TableProperty.Name, TableProperty.OU);

        for (CmsRole role : roles) {

            Item item = m_container.addItem(role);
            item.getItemProperty(TableProperty.Name).setValue(role.getName(A_CmsUI.get().getLocale()));
            item.getItemProperty(TableProperty.Description).setValue(role.getDescription(A_CmsUI.get().getLocale()));
            item.getItemProperty(TableProperty.OU).setValue(role.getOuFqn());
        }

        addItemClickListener(new ItemClickListener() {

            private static final long serialVersionUID = 4807195510202231174L;

            public void itemClick(ItemClickEvent event) {

                setValue(null);
                select(event.getItemId());
                if (event.getButton().equals(MouseButton.RIGHT) || (event.getPropertyId() == null)) {
                    m_menu.setEntries(
                        getMenuEntries(),
                        Collections.singleton(((CmsRole)getValue()).getId().getStringValue()));
                    m_menu.openForTable(event, event.getItemId(), event.getPropertyId(), CmsRoleTable.this);
                } else if (event.getButton().equals(MouseButton.LEFT)
                    && event.getPropertyId().equals(TableProperty.Name)) {
                    updateApp((CmsRole)getValue());
                }

            }

        });
        setCellStyleGenerator(new CellStyleGenerator() {

            private static final long serialVersionUID = 1L;

            public String getStyle(Table source, Object itemId, Object propertyId) {

                if (TableProperty.Name.equals(propertyId)) {
                    return " " + OpenCmsTheme.HOVER_COLUMN;
                }

                return "";
            }
        });
        setVisibleColumns(TableProperty.Name, TableProperty.Description, TableProperty.OU);
    }
459866
public void setRoleMap(String roleName, List<String> mList, boolean omission) {
        if (tc.isDebugEnabled())
            Tr.debug(tc, "Setting rolemap with omission");
        setMethodsAttribute(mList, omission, ROLE, roleName);
        if (omission) {
            unchkResourceForOmissionList = updateList(unchkResourceForOmissionList, mList);
        }
        return;
    }
28207
public static TypeAnnotationPosition
        methodTypeParameter(final List<TypePathEntry> location,
                            final int parameter_index) {
        return methodTypeParameter(location, null, parameter_index, -1);
    }
326039
public CompletableFuture<Revision> addToken(Author author, String projectName,
                                                Token token, ProjectRole role) {
        return addToken(author, projectName, requireNonNull(token, "token").appId(), role);
    }
1308777
protected void addAllUsersToRole(Set<String> users, String role) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.entry(tc, CLASS_NAME + "addAllUsersToRole", new Object[] { users, role });
        }
        Set<String> usersForTheRole = roleToUserMap.get(role);
        if (usersForTheRole != null) {
            usersForTheRole.addAll(users);
        } else {
            usersForTheRole = users;
        }
        roleToUserMap.put(role, usersForTheRole);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.exit(tc, CLASS_NAME + "addAllUsersToRole");
        }
    }
1175520
@Override
    final public boolean isCallerInRole(String roleName) {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled()) {
            Tr.entry(tc, "isCallerInRole, role = " + roleName + ", state = " + StateStrs[state]);
        }

        if (state == METHOD_READY) // d571981
        {
            boolean inRole = super.isCallerInRole(roleName, ivEjbInstance);
            if (isTraceOn && tc.isEntryEnabled()) {
                Tr.exit(tc, "isCallerInRole: " + inRole);
            }
            return inRole;
        } else {
            throw new IllegalStateException("For Singleton, isCallerInRole only allowed while in METHOD_READY state");
        }
    }
1190925
public ServerUpdater addRoleToUser(User user, Role role) {
        delegate.addRoleToUser(user, role);
        return this;
    }