Java Code Examples for com.sun.org.apache.bcel.internal.classfile.JavaClass#isClass()

The following examples show how to use com.sun.org.apache.bcel.internal.classfile.JavaClass#isClass() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ObjectType.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If "this" doesn't reference a class, it references an interface
 * or a non-existant entity.
 */
public boolean referencesClass(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return jc.isClass();
}
 
Example 2
Source File: ObjectType.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If "this" doesn't reference an interface, it references a class
 * or a non-existant entity.
 */
public boolean referencesInterface(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return !jc.isClass();
}
 
Example 3
Source File: ObjectType.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If "this" doesn't reference a class, it references an interface
 * or a non-existant entity.
 */
public boolean referencesClass(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return jc.isClass();
}
 
Example 4
Source File: ObjectType.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If "this" doesn't reference an interface, it references a class
 * or a non-existant entity.
 */
public boolean referencesInterface(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return !jc.isClass();
}
 
Example 5
Source File: ObjectType.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If "this" doesn't reference a class, it references an interface
 * or a non-existant entity.
 */
public boolean referencesClass(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return jc.isClass();
}
 
Example 6
Source File: ObjectType.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If "this" doesn't reference a class, it references an interface
 * or a non-existant entity.
 */
public boolean referencesClass(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return jc.isClass();
}
 
Example 7
Source File: ObjectType.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * If "this" doesn't reference a class, it references an interface
 * or a non-existant entity.
 * @deprecated (since 6.0) this method returns an inaccurate result
 *   if the class or interface referenced cannot
 *   be found: use referencesClassExact() instead
 */
@Deprecated
public boolean referencesClass() {
    try {
        final JavaClass jc = Repository.lookupClass(class_name);
        return jc.isClass();
    } catch (final ClassNotFoundException e) {
        return false;
    }
}
 
Example 8
Source File: ObjectType.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If "this" doesn't reference an interface, it references a class
 * or a non-existant entity.
 */
public boolean referencesInterface(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return !jc.isClass();
}
 
Example 9
Source File: ObjectType.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If "this" doesn't reference an interface, it references a class
 * or a non-existant entity.
 */
public boolean referencesInterface(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return !jc.isClass();
}
 
Example 10
Source File: ObjectType.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If "this" doesn't reference an interface, it references a class
 * or a non-existant entity.
 */
public boolean referencesInterface(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return !jc.isClass();
}
 
Example 11
Source File: ObjectType.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If "this" doesn't reference a class, it references an interface
 * or a non-existant entity.
 */
public boolean referencesClass(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return jc.isClass();
}
 
Example 12
Source File: ObjectType.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * If "this" doesn't reference an interface, it references a class
 * or a non-existant entity.
 */
public boolean referencesInterface(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return !jc.isClass();
}
 
Example 13
Source File: ObjectType.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * If "this" doesn't reference a class, it references an interface
 * or a non-existant entity.
 */
public boolean referencesClass(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return jc.isClass();
}
 
Example 14
Source File: ObjectType.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If "this" doesn't reference an interface, it references a class
 * or a non-existant entity.
 */
public boolean referencesInterface(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return !jc.isClass();
}
 
Example 15
Source File: ObjectType.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If "this" doesn't reference a class, it references an interface
 * or a non-existant entity.
 */
public boolean referencesClass(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return jc.isClass();
}
 
Example 16
Source File: ObjectType.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If "this" doesn't reference an interface, it references a class
 * or a non-existant entity.
 */
public boolean referencesInterface(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return !jc.isClass();
}
 
Example 17
Source File: ObjectType.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * If "this" doesn't reference a class, it references an interface
 * or a non-existant entity.
 */
public boolean referencesClass(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return jc.isClass();
}
 
Example 18
Source File: ObjectType.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * If "this" doesn't reference an interface, it references a class
 * or a non-existant entity.
 */
public boolean referencesInterface(){
  JavaClass jc = Repository.lookupClass(class_name);
  if (jc == null)
    return false;
  else
    return !jc.isClass();
}
 
Example 19
Source File: ObjectType.java    From Bytecoder with Apache License 2.0 2 votes vote down vote up
/**
 * Return true if this type references a class,
 * false if it references an interface.
 * @return true if the type references a class, false if
 *   it references an interface
 * @throws ClassNotFoundException if the class or interface
 *   referenced by this type can't be found
 */
public boolean referencesClassExact() throws ClassNotFoundException {
    final JavaClass jc = Repository.lookupClass(class_name);
    return jc.isClass();
}
 
Example 20
Source File: ObjectType.java    From Bytecoder with Apache License 2.0 2 votes vote down vote up
/**
 * Return true if this type references an interface,
 * false if it references a class.
 * @return true if the type references an interface, false if
 *   it references a class
 * @throws ClassNotFoundException if the class or interface
 *   referenced by this type can't be found
 */
public boolean referencesInterfaceExact() throws ClassNotFoundException {
    final JavaClass jc = Repository.lookupClass(class_name);
    return !jc.isClass();
}