├── .flow
├── .idea
├── .name
├── codeStyleSettings.xml
├── copyright
│ ├── Assembler.xml
│ ├── DLR.xml
│ ├── Non_DLR.xml
│ └── profiles_settings.xml
├── inspectionProfiles
│ ├── Project_Default.xml
│ └── profiles_settings.xml
├── modules.xml
├── runConfigurations
│ └── All_in_Procyon_CompilerTools.xml
├── scopes
│ ├── Procyon_CompilerTools.xml
│ ├── com_strobel.xml
│ ├── com_strobel_expressions.xml
│ └── scope_settings.xml
└── vcs.xml
├── License.Rtf
├── License.html
├── License.txt
├── Procyon.CompilerTools
├── build.gradle
└── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── strobel
│ │ ├── assembler
│ │ ├── CodePrinter.java
│ │ ├── Collection.java
│ │ ├── InputTypeLoader.java
│ │ ├── flowanalysis
│ │ │ ├── ControlFlowEdge.java
│ │ │ ├── ControlFlowGraph.java
│ │ │ ├── ControlFlowGraphBuilder.java
│ │ │ ├── ControlFlowNode.java
│ │ │ ├── ControlFlowNodeType.java
│ │ │ └── JumpType.java
│ │ ├── ir
│ │ │ ├── AnnotationReader.java
│ │ │ ├── ConstantPool.java
│ │ │ ├── Error.java
│ │ │ ├── ErrorOperand.java
│ │ │ ├── ExceptionHandler.java
│ │ │ ├── ExceptionHandlerType.java
│ │ │ ├── FlowControl.java
│ │ │ ├── Frame.java
│ │ │ ├── FrameType.java
│ │ │ ├── FrameValue.java
│ │ │ ├── FrameValueType.java
│ │ │ ├── Instruction.java
│ │ │ ├── InstructionBlock.java
│ │ │ ├── InstructionCollection.java
│ │ │ ├── InstructionVisitor.java
│ │ │ ├── MetadataReader.java
│ │ │ ├── OpCode.java
│ │ │ ├── OpCodeHelpers.java
│ │ │ ├── OpCodeType.java
│ │ │ ├── OperandType.java
│ │ │ ├── StackBehavior.java
│ │ │ ├── StackMapAnalyzer.java
│ │ │ ├── StackMapFrame.java
│ │ │ ├── StackMappingVisitor.java
│ │ │ └── attributes
│ │ │ │ ├── AnnotationDefaultAttribute.java
│ │ │ │ ├── AnnotationsAttribute.java
│ │ │ │ ├── AttributeNames.java
│ │ │ │ ├── BlobAttribute.java
│ │ │ │ ├── BootstrapMethodsAttribute.java
│ │ │ │ ├── BootstrapMethodsTableEntry.java
│ │ │ │ ├── CodeAttribute.java
│ │ │ │ ├── ConstantValueAttribute.java
│ │ │ │ ├── EnclosingMethodAttribute.java
│ │ │ │ ├── ExceptionTableEntry.java
│ │ │ │ ├── ExceptionsAttribute.java
│ │ │ │ ├── InnerClassEntry.java
│ │ │ │ ├── InnerClassesAttribute.java
│ │ │ │ ├── LineNumberTableAttribute.java
│ │ │ │ ├── LineNumberTableEntry.java
│ │ │ │ ├── LocalVariableTableAttribute.java
│ │ │ │ ├── LocalVariableTableEntry.java
│ │ │ │ ├── MethodParameterEntry.java
│ │ │ │ ├── MethodParametersAttribute.java
│ │ │ │ ├── ParameterAnnotationsAttribute.java
│ │ │ │ ├── SignatureAttribute.java
│ │ │ │ ├── SourceAttribute.java
│ │ │ │ └── SourceFileAttribute.java
│ │ └── metadata
│ │ │ ├── AnonymousLocalTypeCollection.java
│ │ │ ├── ArrayType.java
│ │ │ ├── ArrayTypeLoader.java
│ │ │ ├── Buffer.java
│ │ │ ├── BuiltinTypes.java
│ │ │ ├── CapturedType.java
│ │ │ ├── ClassFileReader.java
│ │ │ ├── ClasspathTypeLoader.java
│ │ │ ├── CommonTypeReferences.java
│ │ │ ├── CompilerTarget.java
│ │ │ ├── CompositeTypeLoader.java
│ │ │ ├── CompoundTypeReference.java
│ │ │ ├── ConstantPoolPrinter.java
│ │ │ ├── ConversionType.java
│ │ │ ├── CoreMetadataFactory.java
│ │ │ ├── DefaultTypeVisitor.java
│ │ │ ├── DeobfuscationUtilities.java
│ │ │ ├── DynamicCallSite.java
│ │ │ ├── Error.java
│ │ │ ├── ExceptionHandlerMapper.java
│ │ │ ├── FieldDefinition.java
│ │ │ ├── FieldMetadataVisitor.java
│ │ │ ├── FieldReference.java
│ │ │ ├── FieldVisitor.java
│ │ │ ├── Flags.java
│ │ │ ├── GenericMethodInstance.java
│ │ │ ├── GenericParameter.java
│ │ │ ├── GenericParameterCollection.java
│ │ │ ├── GenericParameterType.java
│ │ │ ├── IAnnotationsProvider.java
│ │ │ ├── ICapturedType.java
│ │ │ ├── IClassSignature.java
│ │ │ ├── IConstantValueProvider.java
│ │ │ ├── IGenericContext.java
│ │ │ ├── IGenericInstance.java
│ │ │ ├── IGenericParameterProvider.java
│ │ │ ├── IMemberDefinition.java
│ │ │ ├── IMetadataResolver.java
│ │ │ ├── IMetadataScope.java
│ │ │ ├── IMetadataTypeMember.java
│ │ │ ├── IMethodSignature.java
│ │ │ ├── IResolverFrame.java
│ │ │ ├── ITypeLoader.java
│ │ │ ├── IVariableDefinitionProvider.java
│ │ │ ├── JarTypeLoader.java
│ │ │ ├── JvmType.java
│ │ │ ├── Label.java
│ │ │ ├── MemberReference.java
│ │ │ ├── MetadataFilters.java
│ │ │ ├── MetadataHelper.java
│ │ │ ├── MetadataParser.java
│ │ │ ├── MetadataResolver.java
│ │ │ ├── MetadataSystem.java
│ │ │ ├── MethodBinder.java
│ │ │ ├── MethodBody.java
│ │ │ ├── MethodBodyParseException.java
│ │ │ ├── MethodDefinition.java
│ │ │ ├── MethodHandle.java
│ │ │ ├── MethodHandleType.java
│ │ │ ├── MethodMetadataVisitor.java
│ │ │ ├── MethodReader.java
│ │ │ ├── MethodReference.java
│ │ │ ├── MethodVisitor.java
│ │ │ ├── PackageReference.java
│ │ │ ├── ParameterDefinition.java
│ │ │ ├── ParameterDefinitionCollection.java
│ │ │ ├── ParameterReference.java
│ │ │ ├── ParameterizedType.java
│ │ │ ├── PrimitiveType.java
│ │ │ ├── RawMethod.java
│ │ │ ├── RawType.java
│ │ │ ├── SentinelTypes.java
│ │ │ ├── SwitchInfo.java
│ │ │ ├── TypeDefinition.java
│ │ │ ├── TypeMapper.java
│ │ │ ├── TypeMetadataVisitor.java
│ │ │ ├── TypeReference.java
│ │ │ ├── TypeRelation.java
│ │ │ ├── TypeSubstitutionVisitor.java
│ │ │ ├── TypeVisitor.java
│ │ │ ├── VariableDefinition.java
│ │ │ ├── VariableDefinitionCollection.java
│ │ │ ├── VariableReference.java
│ │ │ ├── WildcardType.java
│ │ │ ├── annotations
│ │ │ ├── AnnotationAnnotationElement.java
│ │ │ ├── AnnotationElement.java
│ │ │ ├── AnnotationElementType.java
│ │ │ ├── AnnotationParameter.java
│ │ │ ├── AnnotationReader.java
│ │ │ ├── ArrayAnnotationElement.java
│ │ │ ├── ClassAnnotationElement.java
│ │ │ ├── ConstantAnnotationElement.java
│ │ │ ├── CustomAnnotation.java
│ │ │ └── EnumAnnotationElement.java
│ │ │ └── signatures
│ │ │ ├── ArrayTypeSignature.java
│ │ │ ├── BaseType.java
│ │ │ ├── BooleanSignature.java
│ │ │ ├── BottomSignature.java
│ │ │ ├── ByteSignature.java
│ │ │ ├── CharSignature.java
│ │ │ ├── ClassSignature.java
│ │ │ ├── ClassTypeSignature.java
│ │ │ ├── DoubleSignature.java
│ │ │ ├── FieldTypeSignature.java
│ │ │ ├── FloatSignature.java
│ │ │ ├── FormalTypeParameter.java
│ │ │ ├── IntSignature.java
│ │ │ ├── LongSignature.java
│ │ │ ├── MetadataFactory.java
│ │ │ ├── MethodTypeSignature.java
│ │ │ ├── Reifier.java
│ │ │ ├── ReturnType.java
│ │ │ ├── ShortSignature.java
│ │ │ ├── Signature.java
│ │ │ ├── SignatureParser.java
│ │ │ ├── SimpleClassTypeSignature.java
│ │ │ ├── Tree.java
│ │ │ ├── TypeArgument.java
│ │ │ ├── TypeSignature.java
│ │ │ ├── TypeTree.java
│ │ │ ├── TypeTreeVisitor.java
│ │ │ ├── TypeVariableSignature.java
│ │ │ ├── Visitor.java
│ │ │ ├── VoidSignature.java
│ │ │ └── Wildcard.java
│ │ └── decompiler
│ │ ├── AnsiTextOutput.java
│ │ ├── DecompilationOptions.java
│ │ ├── Decompiler.java
│ │ ├── DecompilerContext.java
│ │ ├── DecompilerHelpers.java
│ │ ├── DecompilerSettings.java
│ │ ├── ITextOutput.java
│ │ ├── InstructionHelper.java
│ │ ├── NameSyntax.java
│ │ ├── PlainTextOutput.java
│ │ ├── ast
│ │ ├── AstBuilder.java
│ │ ├── AstCode.java
│ │ ├── AstCodeHelpers.java
│ │ ├── AstKeys.java
│ │ ├── AstOptimizationStep.java
│ │ ├── AstOptimizer.java
│ │ ├── BasicBlock.java
│ │ ├── Block.java
│ │ ├── CaseBlock.java
│ │ ├── CatchBlock.java
│ │ ├── Condition.java
│ │ ├── DefaultMap.java
│ │ ├── Error.java
│ │ ├── Expression.java
│ │ ├── GotoRemoval.java
│ │ ├── Inlining.java
│ │ ├── Label.java
│ │ ├── Lambda.java
│ │ ├── LockInfo.java
│ │ ├── Loop.java
│ │ ├── LoopType.java
│ │ ├── LoopsAndConditions.java
│ │ ├── Node.java
│ │ ├── PatternMatching.java
│ │ ├── Range.java
│ │ ├── Switch.java
│ │ ├── TryCatchBlock.java
│ │ ├── TypeAnalysis.java
│ │ └── Variable.java
│ │ ├── languages
│ │ ├── BytecodeAstLanguage.java
│ │ ├── BytecodeLanguage.java
│ │ ├── BytecodeOutputOptions.java
│ │ ├── EntityType.java
│ │ ├── Language.java
│ │ ├── Languages.java
│ │ ├── LineNumberPosition.java
│ │ ├── Region.java
│ │ ├── TextLocation.java
│ │ ├── TypeDecompilationResults.java
│ │ └── java
│ │ │ ├── BraceEnforcement.java
│ │ │ ├── BraceStyle.java
│ │ │ ├── IOutputFormatter.java
│ │ │ ├── JavaFormattingOptions.java
│ │ │ ├── JavaLanguage.java
│ │ │ ├── JavaOutputVisitor.java
│ │ │ ├── LineNumberTableConverter.java
│ │ │ ├── MemberMapping.java
│ │ │ ├── OffsetToLineNumberConverter.java
│ │ │ ├── TextOutputFormatter.java
│ │ │ ├── Wrapping.java
│ │ │ ├── analysis
│ │ │ ├── ControlFlowEdge.java
│ │ │ ├── ControlFlowEdgeType.java
│ │ │ ├── ControlFlowGraphBuilder.java
│ │ │ ├── ControlFlowNode.java
│ │ │ ├── ControlFlowNodeType.java
│ │ │ ├── Correlator.java
│ │ │ ├── UsageClassifier.java
│ │ │ └── UsageType.java
│ │ │ ├── ast
│ │ │ ├── Annotation.java
│ │ │ ├── AnonymousObjectCreationExpression.java
│ │ │ ├── ArrayCreationExpression.java
│ │ │ ├── ArrayInitializerExpression.java
│ │ │ ├── ArraySpecifier.java
│ │ │ ├── AssertStatement.java
│ │ │ ├── AssignmentExpression.java
│ │ │ ├── AssignmentOperatorType.java
│ │ │ ├── AstBuilder.java
│ │ │ ├── AstMethodBodyBuilder.java
│ │ │ ├── AstNode.java
│ │ │ ├── AstNodeCollection.java
│ │ │ ├── AstType.java
│ │ │ ├── BinaryOperatorExpression.java
│ │ │ ├── BinaryOperatorType.java
│ │ │ ├── BlockStatement.java
│ │ │ ├── BreakStatement.java
│ │ │ ├── CaseLabel.java
│ │ │ ├── CastExpression.java
│ │ │ ├── CatchClause.java
│ │ │ ├── ClassOfExpression.java
│ │ │ ├── ClassType.java
│ │ │ ├── Comment.java
│ │ │ ├── CommentStatement.java
│ │ │ ├── CommentType.java
│ │ │ ├── CompilationUnit.java
│ │ │ ├── ComposedType.java
│ │ │ ├── ConditionalExpression.java
│ │ │ ├── ConstructorDeclaration.java
│ │ │ ├── ConstructorInitializerType.java
│ │ │ ├── ContextTrackingVisitor.java
│ │ │ ├── ContinueStatement.java
│ │ │ ├── ConvertTypeOptions.java
│ │ │ ├── DefiniteAssignmentAnalysis.java
│ │ │ ├── DefiniteAssignmentStatus.java
│ │ │ ├── DepthFirstAstVisitor.java
│ │ │ ├── DoWhileStatement.java
│ │ │ ├── EmptyStatement.java
│ │ │ ├── EntityDeclaration.java
│ │ │ ├── EnumValueDeclaration.java
│ │ │ ├── Expression.java
│ │ │ ├── ExpressionStatement.java
│ │ │ ├── FieldDeclaration.java
│ │ │ ├── ForEachStatement.java
│ │ │ ├── ForStatement.java
│ │ │ ├── GotoStatement.java
│ │ │ ├── IAstVisitor.java
│ │ │ ├── Identifier.java
│ │ │ ├── IdentifierExpression.java
│ │ │ ├── IfElseStatement.java
│ │ │ ├── ImportDeclaration.java
│ │ │ ├── IndexerExpression.java
│ │ │ ├── InliningHelper.java
│ │ │ ├── InsertParenthesesVisitor.java
│ │ │ ├── InstanceInitializer.java
│ │ │ ├── InstanceOfExpression.java
│ │ │ ├── InvocationExpression.java
│ │ │ ├── JavaModifierToken.java
│ │ │ ├── JavaNameResolver.java
│ │ │ ├── JavaPrimitiveCast.java
│ │ │ ├── JavaResolver.java
│ │ │ ├── JavaTokenNode.java
│ │ │ ├── Keys.java
│ │ │ ├── LabelStatement.java
│ │ │ ├── LabeledStatement.java
│ │ │ ├── LambdaExpression.java
│ │ │ ├── LocalClassHelper.java
│ │ │ ├── LocalTypeDeclarationStatement.java
│ │ │ ├── MacNewLine.java
│ │ │ ├── MemberReferenceExpression.java
│ │ │ ├── MethodDeclaration.java
│ │ │ ├── MethodGroupExpression.java
│ │ │ ├── NameResolveMode.java
│ │ │ ├── NameResolveResult.java
│ │ │ ├── NameVariables.java
│ │ │ ├── NewLineNode.java
│ │ │ ├── NewLineType.java
│ │ │ ├── NodeType.java
│ │ │ ├── NullReferenceExpression.java
│ │ │ ├── ObjectCreationExpression.java
│ │ │ ├── PackageDeclaration.java
│ │ │ ├── ParameterDeclaration.java
│ │ │ ├── ParenthesizedExpression.java
│ │ │ ├── PrimitiveExpression.java
│ │ │ ├── ReturnStatement.java
│ │ │ ├── Roles.java
│ │ │ ├── SimpleNameLookupMode.java
│ │ │ ├── SimpleType.java
│ │ │ ├── Statement.java
│ │ │ ├── SuperReferenceExpression.java
│ │ │ ├── SwitchSection.java
│ │ │ ├── SwitchStatement.java
│ │ │ ├── SynchronizedStatement.java
│ │ │ ├── TextNode.java
│ │ │ ├── ThisReferenceExpression.java
│ │ │ ├── ThrowStatement.java
│ │ │ ├── TokenRole.java
│ │ │ ├── TryCatchStatement.java
│ │ │ ├── TypeDeclaration.java
│ │ │ ├── TypeParameterDeclaration.java
│ │ │ ├── TypeReferenceExpression.java
│ │ │ ├── UnaryOperatorExpression.java
│ │ │ ├── UnaryOperatorType.java
│ │ │ ├── UnixNewLine.java
│ │ │ ├── VariableDeclarationStatement.java
│ │ │ ├── VariableInitializer.java
│ │ │ ├── WhileStatement.java
│ │ │ ├── WildcardType.java
│ │ │ ├── WindowsNewLine.java
│ │ │ └── transforms
│ │ │ │ ├── AddReferenceQualifiersTransform.java
│ │ │ │ ├── AssertStatementTransform.java
│ │ │ │ ├── BreakTargetRelocation.java
│ │ │ │ ├── CollapseImportsTransform.java
│ │ │ │ ├── ConvertLoopsTransform.java
│ │ │ │ ├── DeclareLocalClassesTransform.java
│ │ │ │ ├── DeclareVariablesTransform.java
│ │ │ │ ├── EclipseEnumSwitchRewriterTransform.java
│ │ │ │ ├── EclipseStringSwitchRewriterTransform.java
│ │ │ │ ├── EliminateSyntheticAccessorsTransform.java
│ │ │ │ ├── EnumRewriterTransform.java
│ │ │ │ ├── EnumSwitchRewriterTransform.java
│ │ │ │ ├── FlattenElseIfStatementsTransform.java
│ │ │ │ ├── FlattenSwitchBlocksTransform.java
│ │ │ │ ├── IAstTransform.java
│ │ │ │ ├── InlineEscapingAssignmentsTransform.java
│ │ │ │ ├── InsertConstantReferencesTransform.java
│ │ │ │ ├── InsertNecessaryConversionsTransform.java
│ │ │ │ ├── InsertOverrideAnnotationsTransform.java
│ │ │ │ ├── IntroduceInitializersTransform.java
│ │ │ │ ├── IntroduceOuterClassReferencesTransform.java
│ │ │ │ ├── IntroduceStringConcatenationTransform.java
│ │ │ │ ├── LabelCleanupTransform.java
│ │ │ │ ├── LambdaTransform.java
│ │ │ │ ├── MarkReferencedSyntheticsTransform.java
│ │ │ │ ├── RemoveHiddenMembersTransform.java
│ │ │ │ ├── RemoveImplicitBoxingTransform.java
│ │ │ │ ├── RemoveRedundantCastsTransform.java
│ │ │ │ ├── RemoveRedundantInitializersTransform.java
│ │ │ │ ├── RewriteInnerClassConstructorCalls.java
│ │ │ │ ├── RewriteLocalClassesTransform.java
│ │ │ │ ├── RewriteNewArrayLambdas.java
│ │ │ │ ├── SimplifyArithmeticExpressionsTransform.java
│ │ │ │ ├── SimplifyAssignmentsTransform.java
│ │ │ │ ├── StringSwitchRewriterTransform.java
│ │ │ │ ├── TransformationPipeline.java
│ │ │ │ ├── TryWithResourcesTransform.java
│ │ │ │ └── VarArgsTransform.java
│ │ │ └── utilities
│ │ │ ├── RedundantCastUtility.java
│ │ │ └── TypeUtilities.java
│ │ ├── patterns
│ │ ├── AnyNode.java
│ │ ├── AssignmentChain.java
│ │ ├── BackReference.java
│ │ ├── BacktrackingInfo.java
│ │ ├── Choice.java
│ │ ├── DeclaredVariableBackReference.java
│ │ ├── INode.java
│ │ ├── IdentifierExpressionBackReference.java
│ │ ├── IdentifierExpressionRegexNode.java
│ │ ├── LeftmostBinaryOperandNode.java
│ │ ├── Match.java
│ │ ├── MemberReferenceExpressionRegexNode.java
│ │ ├── MemberReferenceTypeNode.java
│ │ ├── NamedNode.java
│ │ ├── OptionalNode.java
│ │ ├── ParameterReferenceNode.java
│ │ ├── Pattern.java
│ │ ├── PossibleMatch.java
│ │ ├── Repeat.java
│ │ ├── Role.java
│ │ ├── SingleOrBinaryAggregateNode.java
│ │ ├── SubtreeMatch.java
│ │ ├── TypeReferenceDescriptorComparisonNode.java
│ │ ├── TypedExpression.java
│ │ ├── TypedNode.java
│ │ └── TypedPrimitiveValueNode.java
│ │ ├── semantics
│ │ └── ResolveResult.java
│ │ ├── types
│ │ ├── ITypeInfo.java
│ │ ├── ITypeListener.java
│ │ ├── TypeManager.java
│ │ └── TypeProxy.java
│ │ └── utilities
│ │ └── TreeTraversal.java
│ └── test
│ ├── java
│ └── com
│ │ └── strobel
│ │ ├── assembler
│ │ └── metadata
│ │ │ ├── MetadataHelperTests.java
│ │ │ └── MetadataParserTests.java
│ │ └── decompiler
│ │ ├── AnnotationTests.java
│ │ ├── ArrayCreationTests.java
│ │ ├── AssertTests.java
│ │ ├── BoxingTests.java
│ │ ├── CallTests.java
│ │ ├── CastTests.java
│ │ ├── ConditionalTests.java
│ │ ├── DecompilerTest.java
│ │ ├── EncodingTests.java
│ │ ├── EnhancedTryTests.java
│ │ ├── EnumTests.java
│ │ ├── GenericsTests.java
│ │ ├── HandlerTests.java
│ │ ├── ImportTests.java
│ │ ├── InitializerTests.java
│ │ ├── InliningTests.java
│ │ ├── InnerClassTests.java
│ │ ├── LoopTests.java
│ │ ├── ModifierTests.java
│ │ ├── NameTests.java
│ │ ├── OperatorTests.java
│ │ ├── PerformanceTests.java
│ │ ├── PrimitiveTests.java
│ │ ├── StringTests.java
│ │ ├── SwitchTests.java
│ │ ├── SyncTests.java
│ │ ├── ThirdPartyTests.java
│ │ ├── TypeInferenceTests.java
│ │ ├── TypeTests.java
│ │ └── VariableTests.java
│ └── resources
│ ├── ArgumentTypes.class
│ ├── Circle.class
│ ├── Drawable.class
│ ├── Hello.class
│ ├── Issue216GotoWVulnerability.class
│ ├── Issue216GotoWVulnerability.j
│ ├── JsrWithoutRet.class
│ ├── JsrWithoutRet.j
│ ├── LiteralAssignments.class
│ ├── LiteralAssignments.j
│ ├── OddsAndEnds.class
│ ├── Rectangle.class
│ ├── SkipJSR.class
│ ├── SootOptimizationTest.class
│ ├── Switch.class
│ ├── UnboxToNumber.class
│ └── WhileLoops.class
├── Procyon.Core
├── build.gradle
└── src
│ └── main
│ └── java
│ └── com
│ └── strobel
│ ├── Procyon.java
│ ├── annotations
│ ├── NotNull.java
│ └── Nullable.java
│ ├── collections
│ ├── ArrayIterator.java
│ ├── Cache.java
│ ├── Constants.java
│ ├── ImmutableList.java
│ ├── ListBuffer.java
│ ├── SmartList.java
│ └── concurrent
│ │ ├── ConcurrentIntObjectHashMap.java
│ │ ├── ConcurrentIntObjectMap.java
│ │ ├── ConcurrentRefValueIntObjectHashMap.java
│ │ ├── ConcurrentWeakIntObjectHashMap.java
│ │ └── IntObjectEntry.java
│ ├── compilerservices
│ ├── CallerResolver.java
│ └── RuntimeHelpers.java
│ ├── componentmodel
│ ├── FrugalKeyMap.java
│ ├── Key.java
│ ├── UserDataStore.java
│ └── UserDataStoreBase.java
│ ├── concurrent
│ ├── StripedLock.java
│ └── StripedReentrantLock.java
│ ├── core
│ ├── Accumulator.java
│ ├── Aggregate.java
│ ├── Aggregator.java
│ ├── ArrayUtilities.java
│ ├── BooleanBox.java
│ ├── ByteBox.java
│ ├── CharacterBox.java
│ ├── Closeables.java
│ ├── CollectionUtilities.java
│ ├── Comparer.java
│ ├── DoubleBox.java
│ ├── Environment.java
│ ├── Error.java
│ ├── ExceptionUtilities.java
│ ├── Fences.java
│ ├── FloatBox.java
│ ├── Freezable.java
│ ├── HashUtilities.java
│ ├── IEqualityComparator.java
│ ├── IFreezable.java
│ ├── IReadOnlyList.java
│ ├── IStrongBox.java
│ ├── IntegerBox.java
│ ├── KeyedQueue.java
│ ├── LongBox.java
│ ├── Mapping.java
│ ├── MutableInteger.java
│ ├── OS.java
│ ├── Pair.java
│ ├── Predicate.java
│ ├── Predicates.java
│ ├── ReadOnlyList.java
│ ├── SafeCloseable.java
│ ├── Selector.java
│ ├── Selectors.java
│ ├── ShortBox.java
│ ├── StringComparator.java
│ ├── StringComparison.java
│ ├── StringUtilities.java
│ ├── StrongBox.java
│ ├── Triple.java
│ ├── VerifyArgument.java
│ └── delegates
│ │ ├── Action1.java
│ │ ├── Func.java
│ │ ├── Func1.java
│ │ └── Func2.java
│ ├── functions
│ ├── Block.java
│ ├── Function.java
│ ├── Supplier.java
│ └── Suppliers.java
│ ├── io
│ ├── Ansi.java
│ └── PathHelper.java
│ ├── reflection
│ └── TargetInvocationException.java
│ └── util
│ ├── ContractUtils.java
│ └── EmptyArrayCache.java
├── Procyon.Decompiler
├── build.gradle
└── src
│ └── main
│ └── java
│ └── com
│ └── strobel
│ └── decompiler
│ ├── CommandLineOptions.java
│ ├── DecompilerDriver.java
│ ├── LineNumberFormatter.java
│ └── LineNumberPrintWriter.java
├── Procyon.Expressions
├── build.gradle
└── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── strobel
│ │ ├── compilerservices
│ │ ├── Closure.java
│ │ └── DebugInfoGenerator.java
│ │ └── expressions
│ │ ├── AnalyzedTree.java
│ │ ├── BinaryExpression.java
│ │ ├── BlockExpression.java
│ │ ├── BoundConstants.java
│ │ ├── CatchBlock.java
│ │ ├── CompilerScope.java
│ │ ├── ConcatExpression.java
│ │ ├── ConditionalExpression.java
│ │ ├── ConstantCheck.java
│ │ ├── ConstantExpression.java
│ │ ├── CustomDelegateTypeCache.java
│ │ ├── DebugViewWriter.java
│ │ ├── DefaultValueExpression.java
│ │ ├── Delegate.java
│ │ ├── Error.java
│ │ ├── Expression.java
│ │ ├── ExpressionList.java
│ │ ├── ExpressionStringBuilder.java
│ │ ├── ExpressionType.java
│ │ ├── ExpressionVisitor.java
│ │ ├── FieldExpression.java
│ │ ├── ForEachExpression.java
│ │ ├── ForExpression.java
│ │ ├── GotoExpression.java
│ │ ├── GotoExpressionKind.java
│ │ ├── Helpers.java
│ │ ├── HoistedLocals.java
│ │ ├── IArgumentProvider.java
│ │ ├── IRuntimeVariables.java
│ │ ├── InvocationExpression.java
│ │ ├── LabelExpression.java
│ │ ├── LabelInfo.java
│ │ ├── LabelTarget.java
│ │ ├── LambdaCompiler.java
│ │ ├── LambdaExpression.java
│ │ ├── LoopExpression.java
│ │ ├── MemberExpression.java
│ │ ├── MethodBinder.java
│ │ ├── MethodCallExpression.java
│ │ ├── NewArrayExpression.java
│ │ ├── NewExpression.java
│ │ ├── Optimizer.java
│ │ ├── ParameterExpression.java
│ │ ├── ParameterExpressionList.java
│ │ ├── RuntimeOperations.java
│ │ ├── RuntimeVariablesExpression.java
│ │ ├── SelfExpression.java
│ │ ├── StackSpiller.java
│ │ ├── SwitchCase.java
│ │ ├── SwitchExpression.java
│ │ ├── TryExpression.java
│ │ ├── TypeBinaryExpression.java
│ │ ├── UnaryExpression.java
│ │ ├── VariableBinder.java
│ │ └── VariableStorageKind.java
│ └── test
│ └── java
│ └── com
│ └── strobel
│ └── expressions
│ ├── AbstractExpressionTest.java
│ ├── BinaryExpressionTests.java
│ ├── CallTests.java
│ ├── CompilerTests.java
│ ├── ConcatTests.java
│ ├── ConstantTests.java
│ ├── ConvertTests.java
│ ├── DynamicMethodTests.java
│ ├── LogicalBranchTests.java
│ ├── OutputRecorder.java
│ └── UnaryExpressionTests.java
├── Procyon.Reflection
├── build.gradle
└── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── strobel
│ │ ├── reflection
│ │ ├── ArrayType.java
│ │ ├── Binder.java
│ │ ├── BindingFlags.java
│ │ ├── BottomType.java
│ │ ├── CallingConvention.java
│ │ ├── CapturedType.java
│ │ ├── CompoundType.java
│ │ ├── ConstructorInfo.java
│ │ ├── ConstructorList.java
│ │ ├── DefaultTypeVisitor.java
│ │ ├── DynamicMethod.java
│ │ ├── ErasedType.java
│ │ ├── Error.java
│ │ ├── FieldInfo.java
│ │ ├── FieldList.java
│ │ ├── FlagUtilities.java
│ │ ├── Flags.java
│ │ ├── GenericParameter.java
│ │ ├── GenericType.java
│ │ ├── Helper.java
│ │ ├── ICapturedType.java
│ │ ├── LocalVariableInfo.java
│ │ ├── MemberFilter.java
│ │ ├── MemberInfo.java
│ │ ├── MemberList.java
│ │ ├── MemberListOptions.java
│ │ ├── MemberResolutionException.java
│ │ ├── MemberType.java
│ │ ├── MethodBase.java
│ │ ├── MethodInfo.java
│ │ ├── MethodList.java
│ │ ├── Missing.java
│ │ ├── NullType.java
│ │ ├── ParameterInfo.java
│ │ ├── ParameterList.java
│ │ ├── PrimitiveType.java
│ │ ├── PrimitiveTypes.java
│ │ ├── Resolver.java
│ │ ├── RuntimeTypeCache.java
│ │ ├── SignatureType.java
│ │ ├── SimpleType.java
│ │ ├── SimpleVisitor.java
│ │ ├── Type.java
│ │ ├── TypeBinder.java
│ │ ├── TypeBindings.java
│ │ ├── TypeCache.java
│ │ ├── TypeContext.java
│ │ ├── TypeList.java
│ │ ├── TypeMapper.java
│ │ ├── TypeMapping.java
│ │ ├── TypeParser.java
│ │ ├── TypeRelation.java
│ │ ├── TypeResolver.java
│ │ ├── TypeVisitor.java
│ │ ├── Types.java
│ │ ├── UnaryTypeVisitor.java
│ │ ├── WildcardType.java
│ │ └── emit
│ │ │ ├── AnnotationBuilder.java
│ │ │ ├── ClassWriter.java
│ │ │ ├── CodeGenerator.java
│ │ │ ├── CodeStream.java
│ │ │ ├── CompilationTarget.java
│ │ │ ├── ConstantPool.java
│ │ │ ├── ConstructorBuilder.java
│ │ │ ├── EnumSwitchCallback.java
│ │ │ ├── Error.java
│ │ │ ├── FieldBuilder.java
│ │ │ ├── GenericParameterBuilder.java
│ │ │ ├── Label.java
│ │ │ ├── LocalBuilder.java
│ │ │ ├── LocalSymInfo.java
│ │ │ ├── MethodBuilder.java
│ │ │ ├── OpCode.java
│ │ │ ├── OperandType.java
│ │ │ ├── ParameterBuilder.java
│ │ │ ├── ScopeAction.java
│ │ │ ├── ScopeTree.java
│ │ │ ├── StackBehavior.java
│ │ │ ├── StringSwitchCallback.java
│ │ │ ├── SwitchCallback.java
│ │ │ ├── SwitchOptions.java
│ │ │ ├── TypeBuilder.java
│ │ │ ├── TypeBuilderInstantiation.java
│ │ │ ├── VerificationException.java
│ │ │ ├── Verifier.java
│ │ │ ├── __ExceptionInfo.java
│ │ │ └── __FixupData.java
│ │ └── util
│ │ └── TypeUtils.java
│ └── test
│ └── java
│ └── com
│ └── strobel
│ └── reflection
│ ├── ReflectionTests.java
│ ├── SignatureTests.java
│ ├── TypeTests.java
│ └── emit
│ ├── TypeBuilderTests.java
│ └── VerifierTests.java
├── README.md
├── build.gradle
├── logo.png
├── logo_small.png
└── settings.gradle
/.flow:
--------------------------------------------------------------------------------
1 | [branchname]
2 | master = default
3 | develop = develop
4 | feature = feature/
5 | release = release/
6 | hotfix = hotfix/
7 | support = support/
8 |
9 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | Procyon
--------------------------------------------------------------------------------
/.idea/copyright/Assembler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/copyright/DLR.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/copyright/Non_DLR.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/All_in_Procyon_CompilerTools.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/.idea/scopes/Procyon_CompilerTools.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/scopes/com_strobel.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/scopes/com_strobel_expressions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/scopes/scope_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/build.gradle:
--------------------------------------------------------------------------------
1 | compileTestJava.options.encoding = 'UTF-8'
2 |
3 | dependencies {
4 | compile project(':Procyon.Core')
5 | testCompile project(':Procyon.Reflection')
6 | testCompile files('src/test/resources')
7 | }
8 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/flowanalysis/ControlFlowNodeType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ControlFlowNodeType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.flowanalysis;
18 |
19 | public enum ControlFlowNodeType {
20 | Normal,
21 | EntryPoint,
22 | RegularExit,
23 | ExceptionalExit,
24 | CatchHandler,
25 | FinallyHandler,
26 | EndFinally
27 | }
28 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/flowanalysis/JumpType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * JumpType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.flowanalysis;
18 |
19 | public enum JumpType {
20 | /**
21 | * A regular control flow edge.
22 | */
23 | Normal,
24 |
25 | /**
26 | * Jump to exception handler (an exception occurred).
27 | */
28 | JumpToExceptionHandler,
29 |
30 | /**
31 | * Jump from try block (not a real jump, as the finally handler executes first).
32 | */
33 | LeaveTry,
34 |
35 | /**
36 | * Jump at the end of a finally block.
37 | */
38 | EndFinally
39 | }
40 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/ErrorOperand.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ErrorOperand.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir;
18 |
19 | /**
20 | * @author Mike Strobel
21 | */
22 | public final class ErrorOperand {
23 | private final String _message;
24 |
25 | public ErrorOperand(final String message) {
26 | _message = message;
27 | }
28 |
29 | @Override
30 | public String toString() {
31 | if (_message != null) {
32 | return _message;
33 | }
34 |
35 | return "!!! BAD OPERAND !!!";
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/ExceptionHandlerType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ExceptionHandlerType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir;
18 |
19 | public enum ExceptionHandlerType {
20 | Catch,
21 | Finally
22 | }
23 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/FlowControl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * FlowControl.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir;
18 |
19 | public enum FlowControl {
20 | Branch,
21 | Breakpoint,
22 | Call,
23 | ConditionalBranch,
24 | Next,
25 | Return,
26 | Throw
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/FrameValueType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * FrameValueType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir;
18 |
19 | public enum FrameValueType {
20 | Empty,
21 | Top,
22 | Integer,
23 | Float,
24 | Long,
25 | Double,
26 | Null,
27 | UninitializedThis,
28 | Reference,
29 | Uninitialized,
30 | Address;
31 |
32 | public final boolean isDoubleWord() {
33 | return this == Double || this == Long;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/OpCodeType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * OpCodeType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir;
18 |
19 | public enum OpCodeType {
20 | Annotation,
21 | Macro,
22 | Internal,
23 | ObjectModel,
24 | Prefix,
25 | Primitive,
26 | }
27 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/StackMapFrame.java:
--------------------------------------------------------------------------------
1 | /*
2 | * StackMapFrame.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir;
18 |
19 | import com.strobel.core.VerifyArgument;
20 |
21 | public final class StackMapFrame {
22 | private final Frame _frame;
23 | private final Instruction _startInstruction;
24 |
25 | public StackMapFrame(final Frame frame, final Instruction startInstruction) {
26 | _frame = VerifyArgument.notNull(frame, "frame");
27 | _startInstruction = VerifyArgument.notNull(startInstruction, "startInstruction");
28 | }
29 |
30 | public final Frame getFrame() {
31 | return _frame;
32 | }
33 |
34 | public final Instruction getStartInstruction() {
35 | return _startInstruction;
36 | }
37 |
38 | @Override
39 | public final String toString() {
40 | return String.format("#%1$04d: %2$s", _startInstruction.getOffset(), _frame);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/attributes/AnnotationDefaultAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * AnnotationDefaultAttribute.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir.attributes;
18 |
19 | import com.strobel.assembler.metadata.annotations.AnnotationElement;
20 | import com.strobel.core.VerifyArgument;
21 |
22 | /**
23 | * @author Mike Strobel
24 | */
25 | public final class AnnotationDefaultAttribute extends SourceAttribute {
26 | private final AnnotationElement _defaultValue;
27 |
28 | public AnnotationDefaultAttribute(final int length, final AnnotationElement defaultValue) {
29 | super(AttributeNames.AnnotationDefault, length);
30 | _defaultValue = VerifyArgument.notNull(defaultValue, "defaultValue");
31 | }
32 |
33 | public AnnotationElement getDefaultValue() {
34 | return _defaultValue;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/attributes/AnnotationsAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * AnnotationsAttribute.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir.attributes;
18 |
19 | import com.strobel.assembler.metadata.annotations.CustomAnnotation;
20 |
21 | /**
22 | * @author Mike Strobel
23 | */
24 | public final class AnnotationsAttribute extends SourceAttribute {
25 | private final CustomAnnotation[] _annotations;
26 |
27 | public AnnotationsAttribute(final String name, final int length, final CustomAnnotation[] annotations) {
28 | super(name, length);
29 | _annotations = annotations;
30 | }
31 |
32 | public CustomAnnotation[] getAnnotations() {
33 | return _annotations;
34 | }
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/attributes/BlobAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * BlobAttribute.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir.attributes;
18 |
19 | import com.strobel.core.VerifyArgument;
20 |
21 | /**
22 | * @author Mike Strobel
23 | */
24 | public final class BlobAttribute extends SourceAttribute {
25 | private final int _dataOffset;
26 | private final byte[] _data;
27 |
28 | public BlobAttribute(final String name, final byte[] data) {
29 | this(name, data, -1);
30 | }
31 |
32 | public BlobAttribute(final String name, final byte[] data, final int dataOffset) {
33 | super(name, data.length);
34 | _dataOffset = dataOffset;
35 | _data = VerifyArgument.notNull(data, "data");
36 | }
37 |
38 | public int getDataOffset() {
39 | return _dataOffset;
40 | }
41 |
42 | public byte[] getData() {
43 | return _data;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/attributes/ConstantValueAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ConstantValueAttribute.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir.attributes;
18 |
19 | /**
20 | * @author Mike Strobel
21 | */
22 | public final class ConstantValueAttribute extends SourceAttribute {
23 | private final Object _value;
24 |
25 | public ConstantValueAttribute(final Object value) {
26 | super(AttributeNames.ConstantValue, 2);
27 | _value = value;
28 | }
29 |
30 | public Object getValue() {
31 | return _value;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/attributes/InnerClassesAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * InnerClassesAttribute.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir.attributes;
18 |
19 | import com.strobel.core.VerifyArgument;
20 |
21 | import java.util.List;
22 |
23 | /**
24 | * @author Mike Strobel
25 | */
26 | public final class InnerClassesAttribute extends SourceAttribute {
27 | private final List _entries;
28 |
29 | public InnerClassesAttribute(final int length, final List entries) {
30 | super(AttributeNames.InnerClasses, length);
31 | _entries = VerifyArgument.notNull(entries, "entries");
32 | }
33 |
34 | public List getEntries() {
35 | return _entries;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/attributes/LineNumberTableEntry.java:
--------------------------------------------------------------------------------
1 | /*
2 | * LineNumberTableEntry.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir.attributes;
18 |
19 | /**
20 | * @author Mike Strobel
21 | */
22 | public final class LineNumberTableEntry {
23 | private final int _offset;
24 | private final int _lineNumber;
25 |
26 | public LineNumberTableEntry(final int offset, final int lineNumber) {
27 | _offset = offset;
28 | _lineNumber = lineNumber;
29 | }
30 |
31 | public int getOffset() {
32 | return _offset;
33 | }
34 |
35 | public int getLineNumber() {
36 | return _lineNumber;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/attributes/LocalVariableTableAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * LocalVariableTableAttribute.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir.attributes;
18 |
19 | import com.strobel.core.ArrayUtilities;
20 |
21 | import java.util.List;
22 |
23 | /**
24 | * @author Mike Strobel
25 | */
26 | public final class LocalVariableTableAttribute extends SourceAttribute {
27 | private final List _entries;
28 |
29 | public LocalVariableTableAttribute(final String name, final LocalVariableTableEntry[] entries) {
30 | super(name, 2 + (entries.length * 10));
31 | _entries = ArrayUtilities.asUnmodifiableList(entries.clone());
32 | }
33 |
34 | public List getEntries() {
35 | return _entries;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/attributes/MethodParameterEntry.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MethodParameterEntry.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir.attributes;
18 |
19 | import com.strobel.assembler.metadata.Flags;
20 |
21 | public final class MethodParameterEntry {
22 | private final String _name;
23 | private final int _flags;
24 |
25 | public MethodParameterEntry(final String name, final int flags) {
26 | _name = name;
27 | _flags = flags;
28 | }
29 |
30 | public String getName() {
31 | return _name;
32 | }
33 |
34 | public int getFlags() {
35 | return _flags;
36 | }
37 |
38 | @Override
39 | public String toString() {
40 | return "MethodParameterEntry{" +
41 | "name='" + _name + "'" +
42 | ", flags=" + Flags.toString(_flags) +
43 | '}';
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/attributes/MethodParametersAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MethodParametersAttribute.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir.attributes;
18 |
19 | import com.strobel.core.VerifyArgument;
20 |
21 | import java.util.List;
22 |
23 | public final class MethodParametersAttribute extends SourceAttribute {
24 | private final List _entries;
25 |
26 | public MethodParametersAttribute(final List entries) {
27 | super(AttributeNames.MethodParameters, 1 + entries.size() * 4);
28 | _entries = VerifyArgument.notNull(entries, "entries");
29 | }
30 |
31 | public List getEntries() {
32 | return _entries;
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/attributes/ParameterAnnotationsAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ParameterAnnotationsAttribute.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir.attributes;
18 |
19 | import com.strobel.assembler.metadata.annotations.CustomAnnotation;
20 |
21 | /**
22 | * @author Mike Strobel
23 | */
24 | public final class ParameterAnnotationsAttribute extends SourceAttribute {
25 | private final CustomAnnotation[][] _annotations;
26 |
27 | public ParameterAnnotationsAttribute(final String name, final int length, final CustomAnnotation[][] annotations) {
28 | super(name, length);
29 | _annotations = annotations;
30 | }
31 |
32 | public CustomAnnotation[][] getAnnotations() {
33 | return _annotations;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/attributes/SignatureAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SignatureAttribute.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir.attributes;
18 |
19 | /**
20 | * @author Mike Strobel
21 | */
22 | public final class SignatureAttribute extends SourceAttribute {
23 | private final String _signature;
24 |
25 | public SignatureAttribute(final String signature) {
26 | super(AttributeNames.Signature, 4);
27 | _signature = signature;
28 | }
29 |
30 | public String getSignature() {
31 | return _signature;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/ir/attributes/SourceFileAttribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SourceFileAttribute.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.ir.attributes;
18 |
19 | /**
20 | * @author Mike Strobel
21 | */
22 | public final class SourceFileAttribute extends SourceAttribute {
23 | private final String _sourceFile;
24 |
25 | public SourceFileAttribute(final String sourceFile) {
26 | super(AttributeNames.SourceFile, 2);
27 | _sourceFile = sourceFile;
28 | }
29 |
30 | public String getSourceFile() {
31 | return _sourceFile;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/CompositeTypeLoader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * CompositeTypeLoader.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | import com.strobel.core.VerifyArgument;
20 |
21 | public final class CompositeTypeLoader implements ITypeLoader {
22 | private final ITypeLoader[] _typeLoaders;
23 |
24 | public CompositeTypeLoader(final ITypeLoader... typeLoaders) {
25 | _typeLoaders = VerifyArgument.noNullElementsAndNotEmpty(typeLoaders, "typeLoaders").clone();
26 | }
27 |
28 | @Override
29 | public boolean tryLoadType(final String internalName, final Buffer buffer) {
30 | for (final ITypeLoader typeLoader : _typeLoaders) {
31 | if (typeLoader.tryLoadType(internalName, buffer)) {
32 | return true;
33 | }
34 |
35 | buffer.reset();
36 | }
37 |
38 | return false;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/ConversionType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ConversionType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | public enum ConversionType {
20 | IDENTITY,
21 | IMPLICIT,
22 | EXPLICIT,
23 | EXPLICIT_TO_UNBOXED,
24 | NONE
25 | }
26 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/FieldMetadataVisitor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * FieldMetadataVisitor.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | /**
20 | * @author Mike Strobel
21 | */
22 | public interface FieldMetadataVisitor
{
23 | R visitField(final FieldReference f, final P p);
24 | }
25 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/GenericParameterType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * GenericParameterType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | public enum GenericParameterType {
20 | Type,
21 | Method
22 | }
23 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/IAnnotationsProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * IAnnotationsProvider.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | import com.strobel.assembler.metadata.annotations.CustomAnnotation;
20 |
21 | import java.util.List;
22 |
23 | /**
24 | * @author Mike Strobel
25 | */
26 | public interface IAnnotationsProvider {
27 | boolean hasAnnotations();
28 | List getAnnotations();
29 | }
30 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/ICapturedType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ICapturedType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | /**
20 | * @author Mike Strobel
21 | */
22 | public interface ICapturedType {
23 | TypeReference getWildcard();
24 | }
25 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/IClassSignature.java:
--------------------------------------------------------------------------------
1 | /*
2 | * IClassSignature.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | import java.util.List;
20 |
21 | public interface IClassSignature extends IGenericParameterProvider {
22 | public TypeReference getBaseType();
23 | public List getExplicitInterfaces();
24 | public boolean hasGenericParameters();
25 | public List getGenericParameters();
26 | }
27 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/IConstantValueProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * IConstantValueProvider.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | /**
20 | * @author Mike Strobel
21 | */
22 | public interface IConstantValueProvider {
23 | boolean hasConstantValue();
24 | Object getConstantValue();
25 | }
26 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/IGenericContext.java:
--------------------------------------------------------------------------------
1 | /*
2 | * IGenericContext.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | /**
20 | * @author Mike Strobel
21 | */
22 | public interface IGenericContext {
23 | public GenericParameter findTypeVariable(final String name);
24 | }
25 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/IGenericInstance.java:
--------------------------------------------------------------------------------
1 | /*
2 | * IGenericInstance.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | import java.util.List;
20 |
21 | public interface IGenericInstance {
22 | boolean hasTypeArguments();
23 | List getTypeArguments();
24 | IGenericParameterProvider getGenericDefinition();
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/IGenericParameterProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * IGenericParameterProvider.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | import java.util.List;
20 |
21 | public interface IGenericParameterProvider {
22 | boolean hasGenericParameters();
23 | boolean isGenericDefinition();
24 | List getGenericParameters();
25 | }
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/IMemberDefinition.java:
--------------------------------------------------------------------------------
1 | /*
2 | * IMemberDefinition.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | /**
20 | * User: Mike Strobel
21 | * Date: 1/6/13
22 | * Time: 5:37 PM
23 | */
24 | public interface IMemberDefinition {
25 | String getName();
26 | String getFullName();
27 | boolean isSpecialName();
28 | TypeReference getDeclaringType();
29 | long getFlags();
30 | int getModifiers();
31 | boolean isFinal();
32 | boolean isNonPublic();
33 | boolean isPrivate();
34 | boolean isProtected();
35 | boolean isPublic();
36 | boolean isStatic();
37 | boolean isSynthetic();
38 | boolean isDeprecated();
39 | boolean isPackagePrivate();
40 | String getBriefDescription();
41 | String getDescription();
42 | String getErasedDescription();
43 | String getSimpleDescription();
44 | }
45 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/IMetadataTypeMember.java:
--------------------------------------------------------------------------------
1 | /*
2 | * IMetadataTypeMember.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | public interface IMetadataTypeMember {
20 | String getName();
21 | TypeReference getDeclaringType();
22 | }
23 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/IMethodSignature.java:
--------------------------------------------------------------------------------
1 | /*
2 | * IMethodSignature.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | import java.util.List;
20 |
21 | public interface IMethodSignature extends IGenericParameterProvider, IGenericContext {
22 | boolean hasParameters();
23 | List getParameters();
24 | TypeReference getReturnType();
25 | List getThrownTypes();
26 |
27 | String getSignature();
28 | String getErasedSignature();
29 |
30 | /**
31 | * Invalidate any signature information. This is not guaranteed to be thread-safe,
32 | * should only be called when a partially constructed method definition changes, e.g.,
33 | * by changing the return type or parameter types.
34 | */
35 | void invalidateSignature();
36 | }
37 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/IResolverFrame.java:
--------------------------------------------------------------------------------
1 | /*
2 | * IResolverFrame.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | /**
20 | * @author Mike Strobel
21 | */
22 | public interface IResolverFrame extends IGenericContext {
23 | public TypeReference findType(final String descriptor);
24 | }
25 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/ITypeLoader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ITypeLoader.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | /**
20 | * @author Mike Strobel
21 | */
22 | public interface ITypeLoader {
23 | public boolean tryLoadType(final String internalName, final Buffer buffer);
24 | }
25 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/IVariableDefinitionProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * IVariableDefinitionProvider.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | import com.strobel.assembler.metadata.VariableDefinition;
20 |
21 | import java.util.List;
22 |
23 | public interface IVariableDefinitionProvider {
24 | boolean hasVariables();
25 | List getVariables();
26 | }
27 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/MethodBodyParseException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MethodBodyParseException.java
3 | *
4 | * Copyright (c) 2014 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | public class MethodBodyParseException extends IllegalStateException {
20 | private final static String DEFAULT_MESSAGE = "An error occurred while parsing a method body.";
21 |
22 | public MethodBodyParseException() {
23 | this(DEFAULT_MESSAGE);
24 | }
25 |
26 | public MethodBodyParseException(final Throwable cause) {
27 | this(DEFAULT_MESSAGE, cause);
28 | }
29 |
30 | public MethodBodyParseException(final String message) {
31 | super(message);
32 | }
33 |
34 | public MethodBodyParseException(final String message, final Throwable cause) {
35 | super(message, cause);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/MethodHandleType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MethodHandleType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | public enum MethodHandleType {
20 | GetField,
21 | GetStatic,
22 | PutField,
23 | PutStatic,
24 | InvokeVirtual,
25 | InvokeStatic,
26 | InvokeSpecial,
27 | NewInvokeSpecial,
28 | InvokeInterface;
29 | }
30 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/MethodMetadataVisitor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MethodMetadataVisitor.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | /**
20 | * @author Mike Strobel
21 | */
22 | public interface MethodMetadataVisitor
{
23 | R visitParameterizedMethod(final MethodReference m, final P p);
24 | R visitMethod(final MethodReference m, final P p);
25 | }
26 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/TypeRelation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * TypeRelation.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata;
18 |
19 | public abstract class TypeRelation extends DefaultTypeVisitor {
20 | }
21 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/annotations/AnnotationAnnotationElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * AnnotationAnnotationElement.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata.annotations;
18 |
19 | import com.strobel.core.VerifyArgument;
20 |
21 | /**
22 | * @author Mike Strobel
23 | */
24 | public final class AnnotationAnnotationElement extends AnnotationElement {
25 | private final CustomAnnotation _annotation;
26 |
27 | public AnnotationAnnotationElement(final CustomAnnotation annotation) {
28 | super(AnnotationElementType.Annotation);
29 | _annotation = VerifyArgument.notNull(annotation, "annotation");
30 | }
31 |
32 | public CustomAnnotation getAnnotation() {
33 | return _annotation;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/annotations/AnnotationElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * AnnotationElement.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata.annotations;
18 |
19 | /**
20 | * @author Mike Strobel
21 | */
22 | public abstract class AnnotationElement {
23 | private final AnnotationElementType _elementType;
24 |
25 | protected AnnotationElement(final AnnotationElementType elementType) {
26 | _elementType = elementType;
27 | }
28 |
29 | public AnnotationElementType getElementType() {
30 | return _elementType;
31 | }
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/annotations/AnnotationParameter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * AnnotationParameter.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata.annotations;
18 |
19 | import com.strobel.core.VerifyArgument;
20 |
21 | /**
22 | * @author Mike Strobel
23 | */
24 | public final class AnnotationParameter {
25 | private final AnnotationElement _value;
26 | private final String _member;
27 |
28 | public AnnotationParameter(final String member, final AnnotationElement value) {
29 | _member = VerifyArgument.notNull(member, "member");
30 | _value = VerifyArgument.notNull(value, "value");
31 | }
32 |
33 | public final String getMember() {
34 | return _member;
35 | }
36 |
37 | public final AnnotationElement getValue() {
38 | return _value;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/annotations/ArrayAnnotationElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ArrayAnnotationElement.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata.annotations;
18 |
19 | import com.strobel.core.VerifyArgument;
20 |
21 | /**
22 | * @author Mike Strobel
23 | */
24 | public final class ArrayAnnotationElement extends AnnotationElement {
25 | private final AnnotationElement[] _elements;
26 |
27 | public ArrayAnnotationElement(final AnnotationElement[] elements) {
28 | super(AnnotationElementType.Array);
29 | _elements = VerifyArgument.notNull(elements, "elements");
30 | }
31 |
32 | public AnnotationElement[] getElements() {
33 | return _elements;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/annotations/ClassAnnotationElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ClassAnnotationElement.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata.annotations;
18 |
19 | import com.strobel.assembler.metadata.TypeReference;
20 |
21 | /**
22 | * @author Mike Strobel
23 | */
24 | public final class ClassAnnotationElement extends AnnotationElement {
25 | private final TypeReference _classType;
26 |
27 | public ClassAnnotationElement(final TypeReference classType) {
28 | super(AnnotationElementType.Class);
29 | _classType = classType;
30 | }
31 |
32 | public TypeReference getClassType() {
33 | return _classType;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/annotations/ConstantAnnotationElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ConstantAnnotationElement.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.assembler.metadata.annotations;
18 |
19 | import com.strobel.core.VerifyArgument;
20 |
21 | /**
22 | * @author Mike Strobel
23 | */
24 | public final class ConstantAnnotationElement extends AnnotationElement {
25 | private final Object _constantValue;
26 |
27 | public ConstantAnnotationElement(final Object constantValue) {
28 | super(AnnotationElementType.Constant);
29 | _constantValue = VerifyArgument.notNull(constantValue, "constantValue");
30 | }
31 |
32 | public Object getConstantValue() {
33 | return _constantValue;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/signatures/BaseType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package com.strobel.assembler.metadata.signatures;
27 |
28 | public interface BaseType extends TypeSignature {}
29 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/signatures/FieldTypeSignature.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package com.strobel.assembler.metadata.signatures;
27 |
28 | public interface FieldTypeSignature extends BaseType, TypeSignature, TypeArgument {}
29 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/signatures/ReturnType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package com.strobel.assembler.metadata.signatures;
27 |
28 | public interface ReturnType extends TypeTree {}
29 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/signatures/Signature.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package com.strobel.assembler.metadata.signatures;
27 |
28 | public interface Signature extends Tree {
29 | FormalTypeParameter[] getFormalTypeParameters();
30 | }
31 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/signatures/Tree.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package com.strobel.assembler.metadata.signatures;
27 |
28 | /**
29 | * Root of the abstract syntax tree hierarchy for generic signatures
30 | */
31 | public interface Tree {}
32 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/signatures/TypeArgument.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package com.strobel.assembler.metadata.signatures;
27 |
28 | public interface TypeArgument extends TypeTree {}
29 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/signatures/TypeSignature.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package com.strobel.assembler.metadata.signatures;
27 |
28 | public interface TypeSignature extends ReturnType {}
29 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/signatures/TypeTree.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package com.strobel.assembler.metadata.signatures;
27 |
28 | public interface TypeTree extends Tree {
29 | void accept(TypeTreeVisitor> v);
30 | }
31 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/signatures/Visitor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package com.strobel.assembler.metadata.signatures;
27 |
28 | public interface Visitor extends TypeTreeVisitor {
29 | void visitClassSignature(ClassSignature cs);
30 | void visitMethodTypeSignature(MethodTypeSignature ms);
31 | }
32 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/DecompilationOptions.java:
--------------------------------------------------------------------------------
1 | /*
2 | * DecompilationOptions.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler;
18 |
19 | public class DecompilationOptions {
20 | private boolean _fullDecompilation = true;
21 | private DecompilerSettings _settings;
22 |
23 | public final boolean isFullDecompilation() {
24 | return _fullDecompilation;
25 | }
26 |
27 | public final void setFullDecompilation(final boolean fullDecompilation) {
28 | _fullDecompilation = fullDecompilation;
29 | }
30 |
31 | public final DecompilerSettings getSettings() {
32 | if (_settings == null) {
33 | _settings = new DecompilerSettings();
34 | }
35 | return _settings;
36 | }
37 |
38 | public final void setSettings(final DecompilerSettings settings) {
39 | _settings = settings;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/NameSyntax.java:
--------------------------------------------------------------------------------
1 | /*
2 | * NameSyntax.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler;
18 |
19 | public enum NameSyntax {
20 | SIGNATURE,
21 | ERASED_SIGNATURE,
22 | DESCRIPTOR,
23 | TYPE_NAME,
24 | SHORT_TYPE_NAME
25 | }
26 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/ast/AstKeys.java:
--------------------------------------------------------------------------------
1 | /*
2 | * AstKeys.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.ast;
18 |
19 | import com.strobel.assembler.metadata.SwitchInfo;
20 | import com.strobel.assembler.metadata.TypeReference;
21 | import com.strobel.componentmodel.Key;
22 | import com.strobel.util.ContractUtils;
23 |
24 | import java.util.List;
25 |
26 | public final class AstKeys {
27 | public final static Key SWITCH_INFO = Key.create("SwitchInfo");
28 | public final static Key PARENT_LAMBDA_BINDING = Key.create("ParentLambdaBinding");
29 | public final static Key> TYPE_ARGUMENTS = Key.create("TypeArguments");
30 |
31 | private AstKeys() {
32 | throw ContractUtils.unreachable();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/ast/Error.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Error.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.ast;
18 |
19 | import com.strobel.util.ContractUtils;
20 |
21 | final class Error {
22 | private Error() {
23 | throw ContractUtils.unreachable();
24 | }
25 |
26 | public static RuntimeException expressionLinkedFromMultipleLocations(final Node node) {
27 | return new IllegalStateException("Expression is linked from several locations: " + node);
28 | }
29 |
30 | public static RuntimeException unsupportedNode(final Node node) {
31 | final String nodeType = node != null ? node.getClass().getName() : String.valueOf(node);
32 | return new IllegalStateException("Unsupported node type: " + nodeType);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/ast/Label.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Label.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.ast;
18 |
19 | import com.strobel.decompiler.ITextOutput;
20 |
21 | public class Label extends Node {
22 | private String _name;
23 | private int _offset = -1;
24 |
25 | public Label() {
26 | }
27 |
28 | public Label(final String name) {
29 | _name = name;
30 | }
31 |
32 | public String getName() {
33 | return _name;
34 | }
35 |
36 | public void setName(final String name) {
37 | _name = name;
38 | }
39 |
40 | public int getOffset() {
41 | return _offset;
42 | }
43 |
44 | public void setOffset(final int offset) {
45 | _offset = offset;
46 | }
47 |
48 | @Override
49 | public void writeTo(final ITextOutput output) {
50 | output.writeDefinition(getName() + ":", this);
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/ast/LoopType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * LoopType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.ast;
18 |
19 | public enum LoopType {
20 | PreCondition,
21 | PostCondition
22 | }
23 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/languages/EntityType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * EntityType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.languages;
18 |
19 | public enum EntityType {
20 | NONE,
21 | TYPE_DEFINITION,
22 | ENUM_VALUE,
23 | FIELD,
24 | METHOD,
25 | CONSTRUCTOR,
26 | PARAMETER
27 | }
28 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/languages/java/BraceEnforcement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * BraceEnforcement.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.languages.java;
18 |
19 | public enum BraceEnforcement {
20 | DoNotChange,
21 | RemoveBraces,
22 | AddBraces,
23 | // AddBracesForMultiLine,
24 | // AddBracesForMultiLineOrAdjacent
25 | }
26 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/languages/java/BraceStyle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * BraceStyle.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.languages.java;
18 |
19 | public enum BraceStyle {
20 | DoNotChange,
21 | EndOfLine,
22 | EndOfLineWithoutSpace,
23 | NextLine,
24 | NextLineShifted,
25 | NextLineShifted2,
26 | BannerStyle
27 | }
28 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/languages/java/OffsetToLineNumberConverter.java:
--------------------------------------------------------------------------------
1 | package com.strobel.decompiler.languages.java;
2 |
3 | /**
4 | * An instance capable of converting from a raw bytecode offset number to a Java
5 | * source code line number.
6 | */
7 | public interface OffsetToLineNumberConverter {
8 | /**
9 | * indicates that the line number is unknown
10 | */
11 | public static final int UNKNOWN_LINE_NUMBER = -100;
12 |
13 | /**
14 | * a do-nothing offset-to-line-number converter which always returns {@link #UNKNOWN_LINE_NUMBER}
15 | */
16 | public static final OffsetToLineNumberConverter NOOP_CONVERTER = new OffsetToLineNumberConverter() {
17 | @Override
18 | public int getLineForOffset(int offset) { return UNKNOWN_LINE_NUMBER; }
19 | };
20 |
21 | /**
22 | * Given a raw bytecode offset number, returns the corresponding Java line number.
23 | * If there is no exact match for 'offset', returns the previous exact-match line number.
24 | *
25 | * @param offset a raw bytecode offset
26 | * @return the corresponding Java source code line number
27 | */
28 | public int getLineForOffset( int offset);
29 | }
30 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/languages/java/Wrapping.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Wrapping.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.languages.java;
18 |
19 | public enum Wrapping {
20 | DoNotWrap,
21 | WrapAlways,
22 | WrapIfTooLong
23 | }
24 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/languages/java/analysis/ControlFlowEdgeType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ControlFlowEdgeType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.languages.java.analysis;
18 |
19 | public enum ControlFlowEdgeType {
20 | /**
21 | * Regular control flow.
22 | */
23 | Normal,
24 |
25 | /**
26 | * Conditional control flow (edge taken if condition is true)
27 | */
28 | ConditionTrue,
29 |
30 | /**
31 | * Conditional control flow (edge taken if condition is false)
32 | */
33 | ConditionFalse,
34 |
35 | /**
36 | * A jump statement (goto, goto case, break or continue)
37 | */
38 | Jump
39 | }
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/languages/java/analysis/ControlFlowNodeType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ControlFlowNodeType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.languages.java.analysis;
18 |
19 | public enum ControlFlowNodeType {
20 | /**
21 | * Unknown node type
22 | */
23 | None,
24 |
25 | /**
26 | * Node in front of a statement
27 | */
28 | StartNode,
29 |
30 | /**
31 | * Node between two statements
32 | */
33 | BetweenStatements,
34 |
35 | /**
36 | * Node at the end of a statement list
37 | */
38 | EndNode,
39 |
40 | /**
41 | * Node representing the position before evaluating the condition of a loop.
42 | */
43 | LoopCondition
44 | }
45 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/languages/java/analysis/UsageType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * UsageType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.languages.java.analysis;
18 |
19 | public enum UsageType {
20 | Read,
21 | Write,
22 | ReadWrite
23 | }
24 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/languages/java/ast/AssignmentOperatorType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * AssignmentOperatorType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.languages.java.ast;
18 |
19 | public enum AssignmentOperatorType {
20 | ASSIGN,
21 | ADD,
22 | SUBTRACT,
23 | MULTIPLY,
24 | DIVIDE,
25 | MODULUS,
26 | SHIFT_LEFT,
27 | SHIFT_RIGHT,
28 | UNSIGNED_SHIFT_RIGHT,
29 | BITWISE_AND,
30 | BITWISE_OR,
31 | EXCLUSIVE_OR,
32 | ANY;
33 |
34 | public final boolean isCompoundAssignment() {
35 | switch (this) {
36 | case ASSIGN:
37 | case ANY:
38 | return false;
39 |
40 | default:
41 | return true;
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/languages/java/ast/ClassType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ClassType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.languages.java.ast;
18 |
19 | public enum ClassType
20 | {
21 | CLASS,
22 | INTERFACE,
23 | ANNOTATION,
24 | ENUM
25 | }
26 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/languages/java/ast/CommentType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * CommentType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.languages.java.ast;
18 |
19 | public enum CommentType {
20 | SingleLine,
21 | MultiLine,
22 | Documentation
23 | }
24 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/languages/java/ast/ConstructorInitializerType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ConstructorInitializerType.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.languages.java.ast;
18 |
19 | public enum ConstructorInitializerType {
20 | SUPER,
21 | THIS
22 | }
23 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/languages/java/ast/MacNewLine.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MacNewLine.java
3 | *
4 | * Copyright (c) 2013 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.languages.java.ast;
18 |
19 | import com.strobel.decompiler.languages.TextLocation;
20 | import com.strobel.decompiler.patterns.INode;
21 | import com.strobel.decompiler.patterns.Match;
22 |
23 | public final class MacNewLine extends NewLineNode {
24 | @Override
25 | public NewLineType getNewLineType() {
26 | return NewLineType.UNIX;
27 | }
28 |
29 | public MacNewLine() {
30 | super();
31 | }
32 |
33 | public MacNewLine(final TextLocation startLocation) {
34 | super(startLocation);
35 | }
36 |
37 | @Override
38 | public boolean matches(final INode other, final Match match) {
39 | return other instanceof UnixNewLine;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/languages/java/ast/NameResolveMode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * NameResolveMode.java
3 | *
4 | * Copyright (c) 2014 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.languages.java.ast;
18 |
19 | public enum NameResolveMode {
20 | TYPE,
21 | EXPRESSION
22 | }
23 |
--------------------------------------------------------------------------------
/Procyon.CompilerTools/src/main/java/com/strobel/decompiler/languages/java/ast/NameResolveResult.java:
--------------------------------------------------------------------------------
1 | /*
2 | * NameResolveResult.java
3 | *
4 | * Copyright (c) 2014 Mike Strobel
5 | *
6 | * This source code is based on Mono.Cecil from Jb Evain, Copyright (c) Jb Evain;
7 | * and ILSpy/ICSharpCode from SharpDevelop, Copyright (c) AlphaSierraPapa.
8 | *
9 | * This source code is subject to terms and conditions of the Apache License, Version 2.0.
10 | * A copy of the license can be found in the License.html file at the root of this distribution.
11 | * By using this source code in any fashion, you are agreeing to be bound by the terms of the
12 | * Apache License, Version 2.0.
13 | *
14 | * You must not remove this notice, or any other, from this software.
15 | */
16 |
17 | package com.strobel.decompiler.languages.java.ast;
18 |
19 | import com.strobel.assembler.metadata.IMetadataTypeMember;
20 |
21 | import java.util.List;
22 |
23 | public abstract class NameResolveResult {
24 | public abstract List