Tabnine Logo
ClassFile.containsAnnotation
Code IndexAdd Tabnine to your IDE (free)

How to use
containsAnnotation
method
in
com.sun.enterprise.deployment.annotation.introspection.ClassFile

Best Java code snippets using com.sun.enterprise.deployment.annotation.introspection.ClassFile.containsAnnotation (Showing top 7 results out of 315)

origin: org.glassfish.main.deployment/dol

  protected boolean containsAnnotation(InputStream is, long size) 
    throws IOException {
    boolean result = false;
    // check if it contains top level annotations...
    ReadableByteChannel channel = null;
    try {
      channel = Channels.newChannel(is);
      if (channel!=null) {
        result = classFile.containsAnnotation(channel, size);
       }
       return result;
    } finally {
      if (channel != null) {
        channel.close();
      }
    }
  }
}
origin: org.glassfish.deployment/dol

  protected boolean containsAnnotation(InputStream is, long size) 
    throws IOException {
    boolean result = false;
    // check if it contains top level annotations...
    ReadableByteChannel channel = null;
    try {
      channel = Channels.newChannel(is);
      if (channel!=null) {
        result = classFile.containsAnnotation(channel, size);
       }
       return result;
    } finally {
      if (channel != null) {
        channel.close();
      }
    }
  }
}
origin: org.glassfish.deployment/dol

/**
 * Read the input channel and initialize instance data
 * structure.
 */public boolean containsAnnotation(ReadableByteChannel in, long size) throws IOException {
  header.clear();
  if (size!=-1 && size>header.capacity()) {
    // time to expand...
    header = ByteBuffer.allocate((int) size);
  }
  long read = (long) in.read(header);
  if (size!=-1 && read!=size) {
    return false;
  }
  header.rewind();
  return containsAnnotation(header);
}
origin: org.glassfish.main.deployment/dol

/**
 * Read the input channel and initialize instance data
 * structure.
 */public boolean containsAnnotation(ReadableByteChannel in, long size) throws IOException {
  header.clear();
  if (size!=-1 && size>header.capacity()) {
    // time to expand...
    header = ByteBuffer.allocate((int) size);
  }
  long read = (long) in.read(header);
  if (size!=-1 && read!=size) {
    return false;
  }
  header.rewind();
  return containsAnnotation(header);
}
origin: org.glassfish.main.deployment/dol

private boolean containsAnnotation(final ByteBuffer headerBuffer) throws IOException {
  /**
   * this is the .class file layout
   *
  ClassFile {
    u4 magic;
    u2 minor_version;
    u2 major_version;
    u2 constant_pool_count;
    cp_info constant_pool[constant_pool_count-1];
    u2 access_flags;
    u2 this_class;
    u2 super_class;
    u2 interfaces_count;
    u2 interfaces[interfaces_count];
    u2 fields_count;
    field_info fields[fields_count];
    u2 methods_count;
    method_info methods[methods_count];
    u2 attributes_count;
    attribute_info attributes[attributes_count];
  }        
   **/
      
  if (headerBuffer.getInt()!=magic) {
    return false;
  }
  
origin: org.glassfish.deployment/dol

private boolean containsAnnotation(final ByteBuffer headerBuffer) throws IOException {
  /**
   * this is the .class file layout
   *
  ClassFile {
    u4 magic;
    u2 minor_version;
    u2 major_version;
    u2 constant_pool_count;
    cp_info constant_pool[constant_pool_count-1];
    u2 access_flags;
    u2 this_class;
    u2 super_class;
    u2 interfaces_count;
    u2 interfaces[interfaces_count];
    u2 fields_count;
    field_info fields[fields_count];
    u2 methods_count;
    method_info methods[methods_count];
    u2 attributes_count;
    attribute_info attributes[attributes_count];
  }        
   **/
      
  if (headerBuffer.getInt()!=magic) {
    return false;
  }
  
origin: org.glassfish.deployment/dol

  baos.write(buffer, 0, bytesRead);
if (classFile.containsAnnotation(baos.toByteArray())) {
  addEntry(je);
com.sun.enterprise.deployment.annotation.introspectionClassFilecontainsAnnotation

Javadoc

Read the input channel and initialize instance data structure.

Popular methods of ClassFile

  • <init>
    Creates a new instance of ClassFile

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Table (org.hibernate.mapping)
    A relational table
  • Best plugins for Eclipse
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