Finds a PropertyNameProcessor registered to the target class.<br>
Returns null if none is registered.<br>
[JSON -&gt; Java]

@param propertyType a class used for searching a PropertyNameProcessor.
19892
public PropertyNameProcessor findJavaPropertyNameProcessor( Class beanClass ) {
      if( !javaPropertyNameProcessorMap.isEmpty() ) {
         Object key = javaPropertyNameProcessorMatcher.getMatch( beanClass, javaPropertyNameProcessorMap.keySet() );
         return (PropertyNameProcessor) javaPropertyNameProcessorMap.get( key );

      }
      return null;
   }
238602
public com.google.api.Property.PropertyType getType() {
    @SuppressWarnings("deprecation")
    com.google.api.Property.PropertyType result = com.google.api.Property.PropertyType.valueOf(type_);
    return result == null ? com.google.api.Property.PropertyType.UNRECOGNIZED : result;
  }
1116405
public final boolean isPropertyTypeDeclared(String propertyName) {
    StaticTypedSlot slot = getSlot(propertyName);
    return slot == null ? false : !slot.isTypeInferred();
  }
169091
public ObjectAndType initProperty(final Object target, Type type, final String attr) {
    Object propObj = target;
    Object property = null;

    int index = 0;
    String[] attrs = Strings.split(attr, ".");
    while (index < attrs.length) {
      try {
        property = getProperty(propObj, attrs[index]);
        Type propertyType = null;
        if (attrs[index].contains("[") && null != property) {
          propertyType = new IdentifierType(property.getClass());
        } else {
          propertyType = type.getPropertyType(attrs[index]);
          if (null == propertyType) {
            logger.error("Cannot find property type [{}] of {}", attrs[index], propObj.getClass());
            throw new RuntimeException(
                "Cannot find property type " + attrs[index] + " of " + propObj.getClass().getName());
          }
        }
        if (null == property) {
          property = propertyType.newInstance();
          setProperty(propObj, attrs[index], property);
        }
        index++;
        propObj = property;
        type = propertyType;
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
    return new ObjectAndType(property, type);
  }
1177938
@Override
  public Optional<Property.Builder> getPropertyNames(
      TypeElement valueType, ExecutableElement method) {
    boolean declaredOnValueType = method.getEnclosingElement().equals(valueType);
    String name = method.getSimpleName().toString();
    Matcher getterMatcher = GETTER_PATTERN.matcher(name);
    if (!getterMatcher.matches()) {
      if (declaredOnValueType) {
        messager.printMessage(
            ERROR,
            "Only getter methods (starting with '" + GET_PREFIX
                + "' or '" + IS_PREFIX + "') may be declared abstract on FreeBuilder types",
            method);
      } else {
        printNoImplementationMessage(valueType, method);
      }
      return Optional.empty();
    }
    String prefix = getterMatcher.group(1);
    String capitalizedName = getterMatcher.group(2);
    if (hasUpperCase(capitalizedName.codePointAt(0))) {
      if (declaredOnValueType) {
        String message = new StringBuilder()
            .append("Getter methods cannot have a lowercase character immediately after the '")
            .append(prefix)
            .append("' prefix on FreeBuilder types (did you mean '")
            .append(prefix)
            .appendCodePoint(Character.toUpperCase(capitalizedName.codePointAt(0)))
            .append(capitalizedName.substring(capitalizedName.offsetByCodePoints(0, 1)))
            .append("'?)")
            .toString();
        messager.printMessage(ERROR, message, method);
      } else {
        printNoImplementationMessage(valueType, method);
      }
      return Optional.empty();
    }
    TypeMirror returnType = getReturnType(valueType, method, types);
    if (returnType.getKind() == TypeKind.VOID) {
      if (declaredOnValueType) {
        messager.printMessage(
            ERROR, "Getter methods must not be void on FreeBuilder types", method);
      } else {
        printNoImplementationMessage(valueType, method);
      }
      return Optional.empty();
    }
    if (prefix.equals(IS_PREFIX) && (returnType.getKind() != TypeKind.BOOLEAN)) {
      if (declaredOnValueType) {
        messager.printMessage(
            ERROR,
            "Getter methods starting with '" + IS_PREFIX
                + "' must return a boolean on FreeBuilder types",
            method);
      } else {
        printNoImplementationMessage(valueType, method);
      }
      return Optional.empty();
    }
    if (!method.getParameters().isEmpty()) {
      if (declaredOnValueType) {
        messager.printMessage(
            ERROR, "Getter methods cannot take parameters on FreeBuilder types", method);
      } else {
        printNoImplementationMessage(valueType, method);
      }
      return Optional.empty();
    }
    if (!isLegalType(returnType)) {
      // The compiler should already have issued an error.
      return Optional.empty();
    }

    String camelCaseName = Introspector.decapitalize(capitalizedName);
    return Optional.of(new Property.Builder()
        .setUsingBeanConvention(true)
        .setName(camelCaseName)
        .setCapitalizedName(capitalizedName)
        .setGetterName(getterMatcher.group(0)));
  }
299555
public Type getPropertyType(String property) {
    Type type = (Type) propertyTypes.get(property);
    if (null == type) {
      Class<?> propertyType = PropertyUtils.getPropertyType(entityClass, property);
      if (null != propertyType) {
        if (Entity.class.isAssignableFrom(propertyType)) type = new EntityType(propertyType);
        if (propertyType.isInterface()) type = Model.getType(propertyType.getName());
        if (null == type) type = new IdentifierType(propertyType);
      }
    }
    if (null == type) logger.error("{} doesn't contains property {}", entityName, property);
    return type;
  }
24286
@Nullable
  private static String getPropertyDeprecationInfo(ObjectType type, String prop) {
    String depReason = getDeprecationReason(type.getOwnPropertyJSDocInfo(prop));
    if (depReason != null) {
      return depReason;
    }

    ObjectType implicitProto = type.getImplicitPrototype();
    if (implicitProto != null) {
      return getPropertyDeprecationInfo(implicitProto, prop);
    }
    return null;
  }
645502
public static JavaType findRootType(JavaType contentType) {

		if (contentType.hasGenericTypes()) {
			return findRootType(contentType.containedType(0));
		} else {
			return contentType;
		}
	}
1007278
public String findProperty( final String propertyName )
    {
        String value = null;
        if( m_properties != null )
        {
            value = m_properties.getProperty( propertyName );
        }
        return value;
    }
160996
@SuppressWarnings("unchecked")
    @Override
    public PropertyEditor find(Class<?> type) {
        if(type == null){
            return null;
        }
        Class<? extends PropertyEditor> editorClass = this.register.get(type);
        if (editorClass != null) {
            try {
                return editorClass.newInstance();
            } catch (Exception e) {
                 //e.printStackTrace();
            }
        }

        final boolean isArray = type.isArray();
        String editorName = BeanUtils.stripPackage(type);
        if (isArray) {
            editorName += EDITOR_ARRAY;
        } else {
            editorName += EDITOR;
        }
        String searchName = null;
        try {
            searchName = BeanUtils.stripClass(type) + "." + editorName;
            editorClass = (Class<? extends PropertyEditor>) BeanUtils.findClass(searchName);
            return editorClass.newInstance();
        } catch (Exception e) {
            //catching, to be compliant with JDK PEM
            if(logger.isLoggable(Level.FINEST)){
                logger.log(Level.FINEST,"Failed to instantiate property editor class  '"+searchName+"'.",e);
            }
        }

        for (String pkg : this.packages) {
            try {
                searchName = pkg + "." + editorName;
                editorClass = (Class<? extends PropertyEditor>) BeanUtils.findClass(searchName);
                return editorClass.newInstance();
            } catch (Exception e) {
                //catching, to be compliant with JDK PEM
                if(logger.isLoggable(Level.FINEST)){
                    logger.log(Level.FINEST,"Failed to instantiate property editor class  '"+searchName+"'.",e);
                }
            }
        }

        if (isArray) {
            Class<?> cellType = type.getComponentType();
            if (find(cellType) != null) {
                return new GenericArrayPropertyEditor(type);
            }
            return null;
        }  else if(type.isPrimitive()){
            return find(BeanUtils.getWrapperTypeFor(type));
        }

        return null;
    }
1110544
private JSType getPropertyTypeIfDeclared(@Nullable ObjectType objectType, String propertyName) {
    if (objectType != null
        && objectType.hasProperty(propertyName)
        && !objectType.isPropertyTypeInferred(propertyName)) {
      return objectType.getPropertyType(propertyName);
    }
    return getNativeType(UNKNOWN_TYPE);
  }
905130
public final boolean defineInferredProperty(String propertyName,
      JSType type, Node propertyNode) {
    if (hasProperty(propertyName)) {
      if (isPropertyTypeDeclared(propertyName)) {
        // We never want to hide a declared property with an inferred property.
        return true;
      }
      JSType originalType = getPropertyType(propertyName);
      type = originalType == null ? type : originalType.getLeastSupertype(type);
    }

    boolean result = defineProperty(propertyName, type, true,
        propertyNode);

    // All property definitions go through this method
    // or defineDeclaredProperty. Because the properties defined an an
    // object can affect subtyping, it's slightly more efficient
    // to register this after defining the property.
    registry.registerPropertyOnType(propertyName, this);

    return result;
  }
865909
private static PropertyDescriptor getPropertyDescriptorOptional(
        Class<?> beanClass, String propertyName)
    {
        List<PropertyDescriptor> propertyDescriptors = 
            getPropertyDescriptorsOptional(beanClass);
        for (PropertyDescriptor propertyDescriptor : propertyDescriptors)
        {
            if (propertyDescriptor.getName().equals(propertyName))
            {
                return propertyDescriptor;
            }
        }
        return null;
    }
1082813
@Nullable
  private static <A extends Annotation> A getAnnotation(PropertyDescriptor descriptor,
      Class<A> type) {
    A a = null;
    if (descriptor.getWriteMethod() != null) {
      a = descriptor.getWriteMethod().getAnnotation(type);
    }
    if (a == null && descriptor.getReadMethod() != null) {
      a = descriptor.getReadMethod().getAnnotation(type);
    }
    return a;
  }
229063
public JsonBeanProcessor findJsonBeanProcessor( Class target ) {
      if( !beanProcessorMap.isEmpty() ) {
         Object key = jsonBeanProcessorMatcher.getMatch( target, beanProcessorMap.keySet() );
         return (JsonBeanProcessor) beanProcessorMap.get( key );
      }
      return null;
   }
263379
@Override
    public int propertyNameToCType(byte[]name, int p, int end) {
        byte[]buf = new byte[PROPERTY_NAME_MAX_SIZE];
        int len = 0;

        for(int p_ = p; p_ < end; p_+= length(name, p_, end)) {
            int code = mbcToCode(name, p_, end);
            if (code == ' ' || code == '-' || code == '_') continue;
            if (code >= 0x80) throw new CharacterPropertyException(EncodingError.ERR_INVALID_CHAR_PROPERTY_NAME, name, p, end);
            buf[len++] = (byte)code;
            if (len >= PROPERTY_NAME_MAX_SIZE) throw new CharacterPropertyException(EncodingError.ERR_INVALID_CHAR_PROPERTY_NAME, name, p, end);
        }

        Integer ctype = CTypeName.Values.get(buf, 0, len);
        if (ctype == null) throw new CharacterPropertyException(EncodingError.ERR_INVALID_CHAR_PROPERTY_NAME, name, p, end);
        return ctype;
    }
1005361
private PropertyType processPropertyType() {
        final PropertyType pt = new PropertyType();
        pt.setValue(currentText.toString());
        if (currentAttributes != null && currentAttributes.getLength() > 0) {
            final String regex = currentAttributes.getValue("regex");
            if (regex != null) {
                pt.setRegex(Boolean.parseBoolean(regex));
            }
            final String caseSensitive = currentAttributes.getValue("caseSensitive");
            if (caseSensitive != null) {
                pt.setCaseSensitive(Boolean.parseBoolean(caseSensitive));
            }
        }
        return pt;
    }