Tabnine Logo
ThriftFieldMetadata.getMethodInjection
Code IndexAdd Tabnine to your IDE (free)

How to use
getMethodInjection
method
in
com.facebook.swift.codec.metadata.ThriftFieldMetadata

Best Java code snippets using com.facebook.swift.codec.metadata.ThriftFieldMetadata.getMethodInjection (Showing top 4 results out of 315)

origin: com.facebook.swift/swift-codec

if (fieldMetadata.getMethodInjection().isPresent()) {
  Object[] parametersValues = new Object[] { data.getValue() };
      fieldMetadata.getMethodInjection().get().getMethod().invoke(instance, parametersValues);
origin: com.gitee.l0km/common-thrifty

DecoratorThriftFieldMetadata(ThriftFieldMetadata input){
  super(
      input.getId(),
      input.getRequiredness(),
      input.getThriftType(),
      input.getName(),
      input.getType(),
      input.getInjections(),
      input.getConstructorInjection(),
      input.getMethodInjection(),
      input.getExtraction(),
      input.getCoercion());
  // 获取field的类型
  List<ThriftInjection> injections = getInjections();
  checkState(injections.size()>0,"invalid size of injections");
  ThriftInjection injection = injections.get(0);		
  if(injection instanceof ThriftParameterInjection){
    javaType = ((ThriftParameterInjection)injection).getJavaType();
  }else if(injection instanceof ThriftFieldInjection){
    javaType = ((ThriftFieldInjection)injection).getField().getType();
  }else{
    javaType = null;
    // 对于不支持的数据类型无法获取field类型,输出警告
    logger.warning(
        String.format("UNSUPPORED TYPE %s,can't get Java Type. "
            + "(不识别的ThriftInjection实例类型,无法实现requiredness转义)",
        null == injection? null : injection.getClass().getName()));
  }
}
/** 重载方法,实现 requiredness 转义 */
origin: com.gitee.l0km/common-thrift

public DecoratorThriftFieldMetadata(ThriftFieldMetadata input){
  super(
      input.getId(),
      input.getRequiredness(),
      input.getThriftType(),
      input.getName(),
      input.getType(),
      input.getInjections(),
      input.getConstructorInjection(),
      input.getMethodInjection(),
      input.getExtraction(),
      input.getCoercion());
  // 获取field的类型
  List<ThriftInjection> injections = getInjections();
  checkState(injections.size()>0,"invalid size of injections");
  ThriftInjection injection = injections.get(0);		
  if(injection instanceof ThriftParameterInjection){
    javaType = ((ThriftParameterInjection)injection).getJavaType();
  }else if(injection instanceof ThriftFieldInjection){
    javaType = ((ThriftFieldInjection)injection).getField().getType();
  }else{
    javaType = null;
    // 对于不支持的数据类型无法获取field类型,输出警告
    logger.warning(
        String.format("UNSUPPORED TYPE %s,can't get Java Type. "
            + "(不识别的ThriftInjection实例类型,无法实现requiredness转义)",
        null == injection? null : injection.getClass().getName()));
  }
}
/** 重载方法,实现 requiredness 转义 */
origin: com.facebook.swift/swift-codec

if (field.getMethodInjection().isPresent()) {
  injectMethod(read, field.getMethodInjection().get(), instance, unionData);
com.facebook.swift.codec.metadataThriftFieldMetadatagetMethodInjection

Popular methods of ThriftFieldMetadata

  • getId
  • getName
  • getRequiredness
  • getThriftType
  • getConstructorInjection
  • getExtraction
  • getInjections
  • getType
  • isWriteOnly
  • getCoercion
  • <init>
  • isReadOnly
  • <init>,
  • isReadOnly,
  • isTypePredicate,
  • getIdGetter,
  • getIdlAnnotations,
  • isRecursiveReference,
  • isTypeReferenceRecursive

Popular in Java

  • Start an intent from android
  • getSystemService (Context)
  • onRequestPermissionsResult (Fragment)
  • addToBackStack (FragmentTransaction)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now