This method creates a {@link PluginData} for each field with
{@link Plugin.Data} annotation.

@see #getFileName(Field)
@see #getFieldValue(Field)
773765
@Override
    public List<PluginData> getPluginData() {
        List<PluginData> results = new ArrayList<>();
        for (Field field : getClass().getDeclaredFields()) {
            if (field.isAnnotationPresent(Plugin.Data.class)) {
                String fileName = getFileName(field);
                results.add(new PluginData(fileName, getFieldValue(field)));
            }
        }
        return results;
    }
306067
public static function pName()
    {
        if (is_null(self::$pluginName)) {
            self::$pluginName = explode('/', plugin_basename(__FILE__))[0];
        }

        return self::$pluginName;
    }
328025
protected void createExtendedMetaDataAnnotations() {
		String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";	
		addAnnotation
		  (modcaString4EDataType, 
		   source, 
		   new String[] {
			 "name", "ModcaString4",
			 "baseType", "java.lang.String",
			 "minLength", "4",
			 "maxLength", "4"
		   });	
		addAnnotation
		  (modcaString8EDataType, 
		   source, 
		   new String[] {
			 "name", "ModcaString8",
			 "baseType", "java.lang.String",
			 "minLength", "8",
			 "maxLength", "8"
		   });	
		addAnnotation
		  (modcaString32EDataType, 
		   source, 
		   new String[] {
			 "name", "ModcaString32",
			 "baseType", "java.lang.String",
			 "minLength", "32",
			 "maxLength", "32"
		   });
	}
587683
private static String getEnumAnnotationFieldName(IAnnotationBinding annotation, String varName) {
        if (annotation == null) {
            throw new NullPointerException();
        }
        if (varName == null) {
            throw new NullPointerException();
        }
        for (IMemberValuePairBinding value : annotation.getDeclaredMemberValuePairs()) {
            if (value.getName() != null && value.getName().equals(varName)) {
                assert value.getValue() != null; // annotation value cannot be null
                assert value.getValue() instanceof IVariableBinding;
                IVariableBinding varBinding = (IVariableBinding) value.getValue();
                assert varBinding.isEnumConstant();
                return varBinding.getName();
            }
        }
        return null;
    }
835804
private static boolean checkFieldsWithDataAnnotation(Class<? extends AbstractPlugin> pluginClass) {
        List<Field> dataFields = new ArrayList<>();
        for (Field field : pluginClass.getDeclaredFields()) {
            if (field.isAnnotationPresent(Plugin.Data.class)) {
                dataFields.add(field);
            }
        }
        return shouldHasUniqueValues(dataFields);
    }
345636
private String getFieldName(Map /* String, String */ headers) {
        String fieldName = null;
        String cd = getHeader(headers, CONTENT_DISPOSITION);
        if (cd != null && cd.toLowerCase().startsWith(FORM_DATA)) {

            ParameterParser parser = new ParameterParser();
            parser.setLowerCaseNames(true);
            // Parameter parser can handle null input
            Map params = parser.parse(cd, ';');
            fieldName = (String) params.get("name");
            if (fieldName != null) {
                fieldName = fieldName.trim();
            }
        }
        return fieldName;
    }
186972
public function getValue(string $plugin_field_name): string
    {
        self::init();

        $field_full_name = self::$selected_plugin .'_'. $plugin_field_name;

        if (isset(self::$data[$field_full_name])) {
            return self::$data[$field_full_name];
        }

        return ''; // No component - empty content
    }
15563
public static Object getFieldValue(Object object, String fieldName) {
        try {
            return getDeclaredFieldInHierarchy(object.getClass(), fieldName).get(object);
        } catch (IllegalArgumentException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }
136609
@Nullable
	private FieldAnnotation getFieldAnnotation(final String fieldName) {
		JavaClass cls = getClassContext().getJavaClass();
		Field[] fields = cls.getFields();
		for (Field f : fields) {
			if (f.getName().equals(fieldName)) {
				return new FieldAnnotation(cls.getClassName(), fieldName, f.getSignature(), f.isStatic());
			}
		}
		return null; // shouldn't happen
	}
415325
ByteBuffer getBytesValue(String jpaFieldName, EntityMetadata m, Object value) {
        Attribute idCol = m.getIdAttribute();
        MetamodelImpl metaModel =
            (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(m.getPersistenceUnit());

        EntityType entity = metaModel.entity(m.getEntityClazz());
        Field f = null;
        boolean isId = false;
        if (((AbstractAttribute) idCol).getJPAColumnName().equals(jpaFieldName)) {
            f = (Field) idCol.getJavaMember();
            isId = true;
        } else {
            if (jpaFieldName != null && jpaFieldName.indexOf(Constants.INDEX_TABLE_ROW_KEY_DELIMITER) > 0) {
                String embeddedFieldName =
                    jpaFieldName.substring(0, jpaFieldName.indexOf(Constants.INDEX_TABLE_ROW_KEY_DELIMITER));
                String columnFieldName = jpaFieldName.substring(
                    jpaFieldName.indexOf(Constants.INDEX_TABLE_ROW_KEY_DELIMITER) + 1, jpaFieldName.length());

                Attribute embeddedAttr = entity.getAttribute(embeddedFieldName);
                try {
                    Class<?> embeddedClass = embeddedAttr.getJavaType();
                    if (Collection.class.isAssignableFrom(embeddedClass)) {
                        Class<?> genericClass =
                            PropertyAccessorHelper.getGenericClass((Field) embeddedAttr.getJavaMember());
                        f = genericClass.getDeclaredField(columnFieldName);
                    } else {
                        f = embeddedClass.getDeclaredField(columnFieldName);
                    }

                } catch (SecurityException e) {
                    log.error("Error while extrating " + jpaFieldName + ", Caused by: ", e);
                    throw new QueryHandlerException("Error while extrating " + jpaFieldName + ".");
                } catch (NoSuchFieldException e) {
                    log.error("Error while extrating " + jpaFieldName + ", Caused by: ", e);
                    throw new QueryHandlerException("Error while extrating " + jpaFieldName + ".");
                }
            } else {
                String discriminatorColumn = ((AbstractManagedType) entity).getDiscriminatorColumn();

                if (!jpaFieldName.equals(discriminatorColumn)) {
                    String fieldName = m.getFieldName(jpaFieldName);

                    Attribute col = entity.getAttribute(fieldName);
                    if (col == null) {
                        throw new QueryHandlerException("column type is null for: " + jpaFieldName);
                    }
                    f = (Field) col.getJavaMember();
                }
            }
        }

        // need to do integer.parseInt..as value will be string in case of
        // create query.
        if (f != null && f.getType() != null) {
            return CassandraUtilities.toBytes(value, f);
        } else {
            // default is String type
            return CassandraUtilities.toBytes(value, String.class);
        }
    }
760525
def __getFilename(self, data, scene=1):
        """"""
        try:
            filename = None
            if scene == 1:
                plugin_filename = [i for i in parse_qs(urlsplit(data).query).get("plugin_filename") or [] if i]
                if plugin_filename and len(plugin_filename) == 1:
                    filename = plugin_filename[0]
            elif scene == 2:
                filename = basename(urlsplit(data).path)
            elif scene == 3:
                if PY2:
                    cd = data.headers.getheader("Content-Disposition", "")
                else:
                    cd = data.getheader("Content-Disposition", "")
                filename = parse_header(cd)[-1].get("filename")
            elif scene == 4:
                if PY2:
                    cd = data.info().subtype
                else:
                    cd = data.info().get_content_subtype()
                mt = {'zip': 'zip', 'x-compressed-tar': 'tar.gz', 'x-gzip': 'tar.gz'}
                subtype = mt.get(cd)
                if subtype:
                    filename = "." + subtype
        except Exception as e:
            self.logger.warning(e)
        else:
            if self.__isValidFilename(filename):
                return filename
976345
@Override
    public String getFilename() {
        try {
            if (hasDescriptionProperty(FILENAME)) {
                return getDescriptionProperty(FILENAME).getString().replace(FIELD_DELIMITER + XSDstring.getURI(), "");
            }
            return node.getName();
        } catch (final RepositoryException e) {
            throw new RepositoryRuntimeException(e);
        }
    }
1082751
public function export_value() {
        $value = $this->get_value();
        if ($this->is_empty($value)) {
            return null;
        }

        if ($dataid = $this->get('id')) {
            $context = $this->get_context();
            $processed = file_rewrite_pluginfile_urls($value, 'pluginfile.php',
                $context->id, 'customfield_textarea', 'value', $dataid);
            $value = format_text($processed, $this->get('valueformat'), ['context' => $context]);
        } else {
            $fieldid = $this->get_field()->get('id');
            $configcontext = $this->get_field()->get_handler()->get_configuration_context();
            $processed = file_rewrite_pluginfile_urls($value, 'pluginfile.php',
                $configcontext->id, 'customfield_textarea', 'defaultvalue', $fieldid);
            $valueformat = $this->get_field()->get_configdata_property('defaultvalueformat');
            $value = format_text($processed, $valueformat, ['context' => $configcontext]);
        }

        return $value;
    }
61698
private String getDataFieldValue(String dataHeader, String fieldName) {
		String value = null;
		String token = StrUtil.format("{}=\"", fieldName);
		int pos = dataHeader.indexOf(token);
		if (pos > 0) {
			int start = pos + token.length();
			int end = dataHeader.indexOf('"', start);
			if ((start > 0) && (end > 0)) {
				value = dataHeader.substring(start, end);
			}
		}
		return value;
	}
755168
@Override
    public Object createExample() {
        AnnotationDto result = new AnnotationDto();
        Map<String, String> sampleFields = new HashMap<>();

        fields.put("fieldName", "fieldValue");
        result.setFields(sampleFields);
        result.setId("datasourceSpecificUniqueID");
        result.setMetric("metric");
        result.setScope("scope");
        result.setSource("splunk");

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

        sampleTags.put("tagk", "tagv");
        result.setTags(sampleTags);
        result.setTimestamp(System.currentTimeMillis());
        result.setType("erelease");
        return result;
    }
1176850
public static String getFieldName(Field field) {
        String name = field.getName();
        String formattedName = Formatter.toCamelCase(name);
        if (isReservedKeyword(formattedName)) {
            return formattedName + '_';
        }
        return formattedName;
    }
440558
public <T> T getField(String fieldName, Class<T> clazz) {
        return DPathUtils.getValue(fieldData, fieldName, clazz);
    }