public static String getSourceFile(TypeDefinition type) { for(SourceAttribute sa : type.getSourceAttributes()) { if(sa instanceof SourceFileAttribute) { return ((SourceFileAttribute)sa).getSourceFile(); } } return null; } }
private InnerClassEntry findInnerClassEntry(final String name) { if (_owner == null) { return null; } final String internalName = name.replace('.', '/'); final SourceAttribute attribute = SourceAttribute.find(AttributeNames.InnerClasses, _owner.getSourceAttributes()); if (attribute instanceof InnerClassesAttribute) { final List<InnerClassEntry> entries = ((InnerClassesAttribute) attribute).getEntries(); for (final InnerClassEntry entry : entries) { if (StringUtilities.equals(entry.getInnerClassName(), internalName)) { return entry; } } } return null; }
private InnerClassEntry findInnerClassEntry(final String name) { if (_owner == null) { return null; } final String internalName = name.replace('.', '/'); final SourceAttribute attribute = SourceAttribute.find(AttributeNames.InnerClasses, _owner.getSourceAttributes()); if (attribute instanceof InnerClassesAttribute) { final List<InnerClassEntry> entries = ((InnerClassesAttribute) attribute).getEntries(); for (final InnerClassEntry entry : entries) { if (StringUtilities.equals(entry.getInnerClassName(), internalName)) { return entry; } } } return null; }
private InnerClassEntry findInnerClassEntry(final String name) { if (_owner == null) { return null; } final String internalName = name.replace('.', '/'); final SourceAttribute attribute = SourceAttribute.find(AttributeNames.InnerClasses, _owner.getSourceAttributes()); if (attribute instanceof InnerClassesAttribute) { final List<InnerClassEntry> entries = ((InnerClassesAttribute) attribute).getEntries(); for (final InnerClassEntry entry : entries) { if (StringUtilities.equals(entry.getInnerClassName(), internalName)) { return entry; } } } return null; }
@Override public DynamicCallSite lookupDynamicCallSite(final int token) { final ConstantPool.InvokeDynamicInfoEntry entry = _constantPool.getEntry(token); final BootstrapMethodsAttribute attribute = SourceAttribute.find(AttributeNames.BootstrapMethods, _typeDefinition.getSourceAttributes()); final BootstrapMethodsTableEntry bootstrapMethod = attribute.getBootstrapMethods() .get(entry.bootstrapMethodAttributeIndex); final ConstantPool.NameAndTypeDescriptorEntry nameAndType = _constantPool.getEntry(entry.nameAndTypeDescriptorIndex); return new DynamicCallSite( bootstrapMethod.getMethod(), bootstrapMethod.getArguments(), nameAndType.getName(), _parser.parseMethodSignature(nameAndType.getType()) ); }
@Override public DynamicCallSite lookupDynamicCallSite(final int token) { final ConstantPool.InvokeDynamicInfoEntry entry = _constantPool.getEntry(token); final BootstrapMethodsAttribute attribute = SourceAttribute.find(AttributeNames.BootstrapMethods, _typeDefinition.getSourceAttributes()); final BootstrapMethodsTableEntry bootstrapMethod = attribute.getBootstrapMethods() .get(entry.bootstrapMethodAttributeIndex); final ConstantPool.NameAndTypeDescriptorEntry nameAndType = _constantPool.getEntry(entry.nameAndTypeDescriptorIndex); return new DynamicCallSite( bootstrapMethod.getMethod(), bootstrapMethod.getArguments(), nameAndType.getName(), _parser.parseMethodSignature(nameAndType.getType()) ); }
@Override public DynamicCallSite lookupDynamicCallSite(final int token) { final ConstantPool.InvokeDynamicInfoEntry entry = _constantPool.getEntry(token); final BootstrapMethodsAttribute attribute = SourceAttribute.find(AttributeNames.BootstrapMethods, _typeDefinition.getSourceAttributes()); final BootstrapMethodsTableEntry bootstrapMethod = attribute.getBootstrapMethods() .get(entry.bootstrapMethodAttributeIndex); final ConstantPool.NameAndTypeDescriptorEntry nameAndType = _constantPool.getEntry(entry.nameAndTypeDescriptorIndex); return new DynamicCallSite( entry.bootstrapMethodAttributeIndex, bootstrapMethod.getMethodHandle(), bootstrapMethod.getArguments(), nameAndType.getName(), _parser.parseMethodSignature(nameAndType.getType()) ); }
resolvedInnerType.getSourceAttributes() );
resolvedInnerType.getSourceAttributes() );
resolvedInnerType.getSourceAttributes() );
writeTypeHeader(output, type); for (final SourceAttribute attribute : type.getSourceAttributes()) { writeTypeAttribute(output, type, attribute);
writeTypeHeader(output, type); for (final SourceAttribute attribute : type.getSourceAttributes()) { writeTypeAttribute(output, type, attribute);
for (final SourceAttribute attribute : type.getSourceAttributes()) { writeTypeAttribute(output, type, attribute);