Tabnine Logo
StructFieldVisitor
Code IndexAdd Tabnine to your IDE (free)

How to use
StructFieldVisitor
in
com.ociweb.pronghorn.struct

Best Java code snippets using com.ociweb.pronghorn.struct.StructFieldVisitor (Showing top 8 results out of 315)

origin: com.ociweb/PronghornPipes

public <T> boolean identityVisit(DataInputBlobReader<?> reader, T attachedObject, StructFieldVisitor<T> visitor) {
  int structId = DataInputBlobReader.getStructType(reader);
  
  int idx =  StructRegistry.FIELD_MASK & (int)fieldLookupByIdentity(attachedObject, structId);
  if (idx>=0) {
    DataInputBlobReader.position(reader, DataInputBlobReader.readFromLastInt(reader, idx));
    visitor.read((T)(fieldLocals[structId][idx]), reader);
    return true;
  } else {
    return false;
  }
}
origin: oci-pronghorn/Pronghorn

visitor.read((T) locals[i], reader, fieldIdBase | i);
origin: com.ociweb/pronghorn-pipes

visitor.read((T) locals[i], reader, fieldIdBase | i);
origin: oci-pronghorn/Pronghorn

visitor.read((T) locals[i], reader, fieldIdBase | i);
origin: com.ociweb/PronghornPipes

public <T> boolean visit(DataInputBlobReader<?> reader, 
           Class<T> attachedInstanceOf, 
           StructFieldVisitor<T> visitor) {
      
  boolean result = false;
  int structId = DataInputBlobReader.getStructType(reader);
  if (structId>0) {
    
    Object[] locals = this.fieldLocals[StructRegistry.STRUCT_MASK & structId];
    for(int i = 0; i<locals.length; i++) {
      if (attachedInstanceOf.isInstance(locals[i])) {
        int readFromLastInt = DataInputBlobReader.readFromLastInt(reader, i);
        //if no value then do not visit
        if (readFromLastInt>=0 && readFromLastInt<reader.length()) {
          result = true;
          DataInputBlobReader.position(reader, readFromLastInt);    
          
          //logger.info("visit struct id {} {}",structId, Integer.toHexString(structId));
          //logger.info("bbb reading {} from position {} pos {} from pipe {}",locals[i], readFromLastInt, i, reader.getBackingPipe(reader).id );
                      
          visitor.read((T) locals[i], reader);
        }
      }
    }
  }
  return result;
}
 
origin: com.ociweb/pronghorn-pipes

public <T> boolean identityVisit(DataInputBlobReader<?> reader, T attachedObject, StructFieldVisitor<T> visitor) {
  int structId = DataInputBlobReader.getStructType(reader);
  long fieldIdBase = ((long)(IS_STRUCT_BIT|(STRUCT_MASK & structId)))<<STRUCT_OFFSET;
  
  int idx =  StructRegistry.FIELD_MASK & (int)fieldLookupByIdentity(attachedObject, structId);
  if (idx>=0) {
    int readFromLastInt = DataInputBlobReader.readFromLastInt(reader, idx);
    if (readFromLastInt>=0) {
      DataInputBlobReader.position(reader, readFromLastInt);
      visitor.read((T)(fieldLocals[STRUCT_MASK&structId][idx]), reader, fieldIdBase | idx);
      return true;
    } else {
      return false;
    }
  } else {
    return false;
  }
}
origin: com.ociweb/pronghorn-pipes

visitor.read((T) locals[i], reader, fieldIdBase | i);
origin: oci-pronghorn/Pronghorn

public <T> boolean identityVisit(DataInputBlobReader<?> reader, T attachedObject, StructFieldVisitor<T> visitor) {
  int structId = DataInputBlobReader.getStructType(reader);
  long fieldIdBase = ((long)(IS_STRUCT_BIT|(STRUCT_MASK & structId)))<<STRUCT_OFFSET;
  
  int idx =  StructRegistry.FIELD_MASK & (int)fieldLookupByIdentity(attachedObject, structId);
  if (idx>=0) {
    int readFromLastInt = DataInputBlobReader.readFromLastInt(reader, idx);
    if (readFromLastInt>=0) {
      DataInputBlobReader.position(reader, readFromLastInt);
      visitor.read((T)(fieldLocals[STRUCT_MASK&structId][idx]), reader, fieldIdBase | idx);
      return true;
    } else {
      return false;
    }
  } else {
    return false;
  }
}
com.ociweb.pronghorn.structStructFieldVisitor

Most used methods

  • read

Popular in Java

  • Reading from database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Join (org.hibernate.mapping)
  • Top Sublime Text plugins
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