本文整理汇总了Java中edu.umd.cs.findbugs.classfile.analysis.ClassData.getData方法的典型用法代码示例。如果您正苦于以下问题:Java ClassData.getData方法的具体用法?Java ClassData.getData怎么用?Java ClassData.getData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.umd.cs.findbugs.classfile.analysis.ClassData
的用法示例。
在下文中一共展示了ClassData.getData方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: analyze
import edu.umd.cs.findbugs.classfile.analysis.ClassData; //导入方法依赖的package包/类
public ClassNameAndSuperclassInfo analyze(IAnalysisCache analysisCache, ClassDescriptor descriptor)
throws CheckedAnalysisException {
// Get InputStream reading from class data
ClassData classData = analysisCache.getClassAnalysis(ClassData.class, descriptor);
DataInputStream classDataIn = new DataInputStream(new ByteArrayInputStream(classData.getData()));
// Read the class info
ClassParserInterface parser = new ClassParser(classDataIn, descriptor, classData.getCodeBaseEntry());
ClassNameAndSuperclassInfo.Builder classInfoBuilder = new ClassNameAndSuperclassInfo.Builder();
parser.parse(classInfoBuilder);
ClassNameAndSuperclassInfo classInfo = classInfoBuilder.build();
if (!classInfo.getClassDescriptor().equals(descriptor)) {
throw new ClassNameMismatchException(descriptor, classInfo.getClassDescriptor(), classData.getCodeBaseEntry());
}
return classInfo;
}
示例2: loadClassData
import edu.umd.cs.findbugs.classfile.analysis.ClassData; //导入方法依赖的package包/类
private byte[] loadClassData(String name) throws CheckedAnalysisException {
ClassDescriptor d = DescriptorFactory.createClassDescriptorFromDottedClassName(name);
ClassData data = Global.getAnalysisCache().getClassAnalysis(ClassData.class, d);
return data.getData();
}
示例3: loadClassData
import edu.umd.cs.findbugs.classfile.analysis.ClassData; //导入方法依赖的package包/类
static byte[] loadClassData(String name) throws CheckedAnalysisException {
ClassDescriptor d = DescriptorFactory.createClassDescriptorFromDottedClassName(name);
ClassData data = Global.getAnalysisCache().getClassAnalysis(ClassData.class, d);
return data.getData();
}
示例4: analyze
import edu.umd.cs.findbugs.classfile.analysis.ClassData; //导入方法依赖的package包/类
public FBClassReader analyze(IAnalysisCache analysisCache, ClassDescriptor descriptor) throws CheckedAnalysisException {
ClassData classData = analysisCache.getClassAnalysis(ClassData.class, descriptor);
FBClassReader classReader = new FBClassReader(classData.getData());
return classReader;
}