Generates the _set* setters for readonly properties and appends them to the given block.

@return A List of all readonly properties.
19364
private ImmutableList<MemberDefinition> parseAttributeReflectedProperties(
      final PolymerClassDefinition cls) {
    ImmutableList.Builder<MemberDefinition> attrReflectedProps = ImmutableList.builder();

    for (MemberDefinition prop : cls.props) {
      // Generate the setter for readOnly properties.
      if (prop.value.isObjectLit()) {
        Node reflectedValue = NodeUtil.getFirstPropMatchingKey(prop.value, "reflectToAttribute");
        if (reflectedValue != null && reflectedValue.isTrue()) {
          attrReflectedProps.add(prop);
        }
      }
    }

    return attrReflectedProps.build();
  }
1114513
public @Nonnull SetType getBlockedThreads() {
        Set<ThreadLock> acquired = new HashSet<ThreadLock>();
        for (ThreadType thread: threads) {
            acquired.addAll(thread.getAcquiredLocks());
        }

        Set<ThreadType> blocked = new HashSet<ThreadType>();
        for (ThreadType thread: runtime.getThreads()) {
            if (acquired.contains(thread.getWaitingToLock())) {
                blocked.add(thread);
            }
        }

        return runtime.getThreadSet(blocked);
    }
1358621
protected final byte[] serializeAllocationBlock( int blockIndex )
    {
    	byte[] allocationBlock = new byte[AT_BLOCK_SIZE];

        // Regroup I/O to improve performance
        allocationBlock[AB_FLAGS_OFFSET]       = flags[blockIndex];
        allocationBlock[AB_ALLOCSIZE_OFFSET]   = (byte)((allocatedSize[blockIndex] >>> 24) & 0xFF);
        allocationBlock[AB_ALLOCSIZE_OFFSET+1] = (byte)((allocatedSize[blockIndex] >>> 16) & 0xFF);
        allocationBlock[AB_ALLOCSIZE_OFFSET+2] = (byte)((allocatedSize[blockIndex] >>>  8) & 0xFF);
        allocationBlock[AB_ALLOCSIZE_OFFSET+3] = (byte)((allocatedSize[blockIndex] >>>  0) & 0xFF);
        allocationBlock[AB_PREVBLOCK_OFFSET]   = (byte)((previousBlock[blockIndex] >>> 24) & 0xFF);
        allocationBlock[AB_PREVBLOCK_OFFSET+1] = (byte)((previousBlock[blockIndex] >>> 16) & 0xFF);
        allocationBlock[AB_PREVBLOCK_OFFSET+2] = (byte)((previousBlock[blockIndex] >>>  8) & 0xFF);
        allocationBlock[AB_PREVBLOCK_OFFSET+3] = (byte)((previousBlock[blockIndex] >>>  0) & 0xFF);
        allocationBlock[AB_NEXTBLOCK_OFFSET]   = (byte)((nextBlock[blockIndex] >>> 24) & 0xFF);
        allocationBlock[AB_NEXTBLOCK_OFFSET+1] = (byte)((nextBlock[blockIndex] >>> 16) & 0xFF);
        allocationBlock[AB_NEXTBLOCK_OFFSET+2] = (byte)((nextBlock[blockIndex] >>>  8) & 0xFF);
        allocationBlock[AB_NEXTBLOCK_OFFSET+3] = (byte)((nextBlock[blockIndex] >>>  0) & 0xFF);
        
        return allocationBlock;
    }
70042
@SuppressWarnings({ "rawtypes", "unchecked" })
	@Override
	public PrefixedPropertiesEnumeration<?> propertyNames() {
		lock.readLock().lock();
		try {
			final Set result = new HashSet();
			for (final Object key : getKeyMap(false).keySet()) {
				result.add(getUnprefixedKey(key));
			}
			return new PrefixedPropertiesEnumerationImpl(result.iterator(), true);
		} finally {
			lock.readLock().unlock();
		}
	}
769296
private List<Set<ChainedProperty<S>>> getKeys()
        throws SupportException, RepositoryException
    {
        StorableInfo<S> info = StorableIntrospector.examine(mIndexAnalyzer.getStorableType());
        List<Set<ChainedProperty<S>>> keys = new ArrayList<Set<ChainedProperty<S>>>();

        keys.add(stripOrdering(info.getPrimaryKey().getProperties()));

        for (StorableKey<S> altKey : info.getAlternateKeys()) {
            keys.add(stripOrdering(altKey.getProperties()));
        }

        // Also fold in all unique indexes, just in case they weren't reported
        // as actual keys.
        Collection<StorableIndex<S>> indexes =
            mRepoAccess.storageAccessFor(getStorableType()).getAllIndexes();

        for (StorableIndex<S> index : indexes) {
            if (!index.isUnique()) {
                continue;
            }

            int propCount = index.getPropertyCount();
            Set<ChainedProperty<S>> props = new LinkedHashSet<ChainedProperty<S>>(propCount);

            for (int i=0; i<propCount; i++) {
                props.add(index.getOrderedProperty(i).getChainedProperty());
            }

            keys.add(props);
        }

        return keys;
    }
1070537
protected BlockInfo listMoveToHead(BlockInfo block, BlockInfo head,
      DatanodeIndex indexes) {
    assert head != null : "Head can not be null";
    if (head == block) {
      return head;
    }
    BlockInfo next = block.getSetNext(indexes.currentIndex, head);
    BlockInfo prev = block.getSetPrevious(indexes.currentIndex, null);

    head.setPrevious(indexes.headIndex, block);
    indexes.headIndex = indexes.currentIndex;
    prev.setNext(prev.findDatanode(this), next);
    if (next != null)
      next.setPrevious(next.findDatanode(this), prev);
    return block;
  }
336282
private ArrayList<AptPropertySet> initPropertySets()
    {
        ArrayList<AptPropertySet> propSets = new ArrayList<AptPropertySet>();

        if ( _intfDecl == null )
            return propSets;

        // TODO: enforce presence of prefixes when multiple property sets w/ the same
        // property name exist

        //
        // Add the intrinsic/base property set
        //

        TypeDeclaration basePropsDecl =
            _ap.getAnnotationProcessorEnvironment().getTypeDeclaration( "org.apache.beehive.controls.api.properties.BaseProperties" );
        if ( basePropsDecl != null )
        {
            propSets.add( new AptPropertySet( null, basePropsDecl, _ap ) );
        }

        //
        // Add external property sets
        //
        ExternalPropertySets extPropsAnnotation = _intfDecl.getAnnotation(ExternalPropertySets.class);
        if ( extPropsAnnotation != null )
        {
            if (isExtension())
            {
                _ap.printError( _intfDecl, "extpropertyset.illegal.usage" );
            }

            try
            {
                Class[] extProps = extPropsAnnotation.value();
            }
            catch ( MirroredTypesException mte )
            {
                Collection<String> extProps = mte.getQualifiedNames();
                for ( String extPropName : extProps )
                {
                    TypeDeclaration extPropDecl = _ap.getAnnotationProcessorEnvironment().getTypeDeclaration( extPropName );
                    if ( extPropDecl != null )
                    {
                        AptPropertySet extPropSet = new AptPropertySet( null, extPropDecl, _ap );
                        propSets.add( extPropSet );
                    }
                    else
                    {
                        _ap.printError( _intfDecl, "extpropertyset.type.not.found", extPropName );
                    }
                }
            }
        }

        //
        // Add nested property sets
        //

        if ( _intfDecl.getNestedTypes() == null )
            return propSets;

        for (TypeDeclaration innerDecl : _intfDecl.getNestedTypes())
        {
            boolean fError = false;
            if (innerDecl.getAnnotation(PropertySet.class) != null)
            {
                if (! (innerDecl instanceof AnnotationTypeDeclaration))
                {
                    _ap.printError( innerDecl, "propertyset.not.annotation.type" );
                    fError = true;
                }

                Retention ret = innerDecl.getAnnotation(Retention.class);
                if (ret == null || ret.value() != RetentionPolicy.RUNTIME)
                {
                    _ap.printError( innerDecl, "propertyset.missing.retention" );
                    fError = true;
                }

                if (isExtension())
                {
                    _ap.printError( innerDecl, "propertyset.illegal.usage.2" );
                    fError = true;
                }

                if ( !fError )
                    propSets.add(
                        new AptPropertySet(this, (AnnotationTypeDeclaration)innerDecl, _ap));
            }
        }

        //
        // Detect the presence of locally declared bound or constrained properties
        // Enforce property name (including prefix) uniqueness across all propertysets on this interface.
        //

        Set<String> propertyNames = new HashSet<String>();

        for (AptPropertySet propSet : propSets)
        {
            for (AptProperty prop : propSet.getProperties())
            {
                if (prop.isBound())
                    _hasBoundProperties = true;

                if (prop.isConstrained())
                    _hasConstrainedProperties = true;

                String propName = prop.getAccessorName();

                if ( propertyNames.contains( propName ) )
                {
                    _ap.printError( _intfDecl, "propertyset.duplicate.property.names", propName, propSet.getShortName() );
                }
                else
                {
                    propertyNames.add( propName );
                }
            }
        }

        return propSets;
    }
746158
public function getAppliedSets()
	{
		$list = ArrayList::create();
		if (!$this->owner->InheritBlockSets) {
			return $list;
		}

		$sets = BlockSet::get()->where("(PageTypesValue IS NULL) OR (PageTypesValue LIKE '%:\"{$this->owner->ClassName}%')");
		$ancestors = $this->owner->getAncestors()->column('ID');

		foreach ($sets as $set) {
			$restrictedToParerentIDs = $set->PageParents()->column('ID');
			if (count($restrictedToParerentIDs)) {
				// check whether the set should include selected parent, in which case check whether
				// it was in the restricted parents list. If it's not, or if include parentpage
				// wasn't selected, we check the ancestors of this page.
				if ($set->IncludePageParent && in_array($this->owner->ID, $restrictedToParerentIDs)) {
					$list->add($set);
				} else {
					if (count($ancestors)) {
						foreach ($ancestors as $ancestor) {
							if (in_array($ancestor, $restrictedToParerentIDs)) {
								$list->add($set);
								continue;
							}
						}
					}
				}
			} else {
				$list->add($set);
			}
		}

		return $list;
	}
1131468
public static List<Block> removeEmptyBlocks(final Collection<Block> blocks) {
      List<Block> cleanBlocks = Lists.newArrayListWithExpectedSize(blocks.size());
      for(Block block : blocks) {
         if(block.content.isEmpty()) {
            continue;
         }

         if(isWhitespace(block.content)) {
            continue;
         }

         cleanBlocks.add(block);
      }
      return cleanBlocks;
   }
1096557
public List<Property<Properties<T>>> getAllProperty()
   {
      List<Property<Properties<T>>> list = new ArrayList<Property<Properties<T>>>();
      List<Node> nodeList = childNode.get("property");
      for(Node node: nodeList)
      {
         Property<Properties<T>>  type = new PropertyImpl<Properties<T>>(this, "property", childNode, node);
         list.add(type);
      }
      return list;
   }
1267772
static Set<Method> getSetters(Class<?> targetClass, String propertyName) {
		String setterName = setterName(propertyName);
		Set<Method> setters = new HashSet<>();

		while (targetClass != null) {
			for (Method method : targetClass.getDeclaredMethods()) {
				if (method.getName().equals(setterName) && method.getParameterTypes().length == 1) {
					logger.debug("Found setter {} in class {}", method, targetClass);
					setters.add(method);
				}
			}
			targetClass = targetClass.getSuperclass();
		}

		return setters;
	}
369973
public List<JspPropertyGroupType<JspConfigType<T>>> getAllJspPropertyGroup()
   {
      List<JspPropertyGroupType<JspConfigType<T>>> list = new ArrayList<JspPropertyGroupType<JspConfigType<T>>>();
      List<Node> nodeList = childNode.get("jsp-property-group");
      for(Node node: nodeList)
      {
         JspPropertyGroupType<JspConfigType<T>>  type = new JspPropertyGroupTypeImpl<JspConfigType<T>>(this, "jsp-property-group", childNode, node);
         list.add(type);
      }
      return list;
   }
784793
protected static List<PropertyDescriptor> getWriteableProperties(Class cls)
        {
        BeanWrapper beanWrapper = new BeanWrapperImpl(cls);
        List<PropertyDescriptor> writeableProperties =
                new ArrayList<PropertyDescriptor>();
        PropertyDescriptor[] props = beanWrapper.getPropertyDescriptors();
        for (PropertyDescriptor prop : props)
            {
            if (isWriteable(prop))
                {
                writeableProperties.add(prop);
                }
            }
        return writeableProperties;
        }
208416
public PropertySet addAll( Collection<String> properties)
    {
    if( properties != null)
      {
      addAll( properties.iterator());
      }

    return this;
    }
1161009
public static List<Method> getBeanSetters(Class<?> clazz) {
    List<Method> methods = CollectUtils.newArrayList();
    for (Method m : clazz.getMethods()) {
      if (m.getName().startsWith("set") && m.getName().length() > 3) {
        if (Modifier.isPublic(m.getModifiers()) && !Modifier.isStatic(m.getModifiers())
            && m.getParameterTypes().length == 1) {
          methods.add(m);
        }
      }
    }
    return methods;
  }
243707
public Set<? extends Element> getSpecifiedElements() {
        if (specifiedElements == null) {
            Set<Element> result = new LinkedHashSet<>();
            result.addAll(specifiedModuleElements);
            result.addAll(specifiedPackageElements);
            result.addAll(specifiedTypeElements);
            specifiedElements = Collections.unmodifiableSet(result);
        }
        return specifiedElements;
    }
963714
def derive_readonly(self):
        
        readonly = list(self.readonly)
        for key, value in self.field_config.items():
            if 'readonly' in value and value['readonly']:
                readonly.append(key)

        return readonly