예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void prepare()
        public virtual void Prepare()
        {
            Types           types       = Compilation.Types;
            Elements        elements    = Compilation.Elements;
            TypeMirrorUtils typeMirrors = new TypeMirrorUtils(types, elements);

            _typeMirrorTestUtils = new TypeMirrorTestUtils(Compilation);
            _validator           = new AllowedTypesValidator(typeMirrors, types);
        }
예제 #2
0
 public FunctionVisitor(Type annotationType, Types types, Elements elements, TypeMirrorUtils typeMirrorUtils, System.Func <T, Optional <string> > customNameExtractor, bool ignoresWarnings)
 {
     annotationType              = typeof(T);
     this._customNameExtractor   = customNameExtractor;
     this._annotationType        = annotationType;
     this._classVisitor          = new ExtensionClassVisitor(types, elements, ignoresWarnings);
     this._parameterVisitor      = new ParameterVisitor(new ParameterTypeVisitor(types, typeMirrorUtils));
     this._elements              = elements;
     this._allowedTypesValidator = new AllowedTypesValidator(typeMirrorUtils, types);
 }
예제 #3
0
        public ProcedureVisitor(Types typeUtils, Elements elementUtils, bool ignoresWarnings)
        {
            TypeMirrorUtils typeMirrors = new TypeMirrorUtils(typeUtils, elementUtils);

            this._typeUtils            = typeUtils;
            this._elementUtils         = elementUtils;
            this._classVisitor         = new ExtensionClassVisitor(typeUtils, elementUtils, ignoresWarnings);
            this._recordVisitor        = new RecordTypeVisitor(typeUtils, typeMirrors);
            this._parameterVisitor     = new ParameterVisitor(new ParameterTypeVisitor(typeUtils, typeMirrors));
            this._performsWriteVisitor = new PerformsWriteMethodVisitor();
        }
예제 #4
0
 public AllowedTypesValidator(TypeMirrorUtils typeMirrors, Types typeUtils)
 {
     this._typeMirrors      = typeMirrors;
     this._whitelistedTypes = typeMirrors.ProcedureAllowedTypes();
     this._typeUtils        = typeUtils;
 }
예제 #5
0
 private TypeMirrorTestUtils(Types types, Elements elements, TypeMirrorUtils typeMirrors)
 {
     this._types       = types;
     this._elements    = elements;
     this._typeMirrors = typeMirrors;
 }
예제 #6
0
 internal RecordTypeVisitor(Types typeUtils, TypeMirrorUtils typeMirrors)
 {
     this._typeUtils   = typeUtils;
     _fieldTypeVisitor = new RecordFieldTypeVisitor(typeUtils, typeMirrors);
 }