Decides what properties should be represented using the black list policy
@param \ReflectionClass                $reflection
@param \Represent\Context\ClassContext $classContext
@return ClassContext
173985
private function generatePropertiesForBlackList(\ReflectionClass $reflection, ClassContext $classContext)
    {
        $properties = $reflection->getProperties();
        $reader     = $this->annotationReader;

        array_walk(
            $properties,
            function ($property) use ($classContext, $reader) {
                $annotation = $reader->getPropertyAnnotation($property, '\Represent\Annotations\Show');
                if ($annotation) {
                    $classContext->properties[] = $property;
                }
            }
        );

        return $classContext;
    }
17305
private function instantiateFilter(Context $context, $className) {
		if($context->view->getFilterFactory()) {
					return $context->view->getFilterFactory()->create($className);
		}

		$reflection = new \ReflectionClass($className);
		$instance = $reflection->newInstance();
		if (! $instance instanceof Filter) {
		    throw new RenderingException($this->getTagName(),
                $context->getFilename(),
                $this->getLineNumber(),
                'Class ' . get_class($instance) . ' is not a Filter.');
        }
        return $instance;
	}
80273
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            classVersion = classContext.getJavaClass().getMajor();
            if (classVersion >= Const.MAJOR_1_4) {
                stack = new OpcodeStack();
                super.visitClassContext(classContext);
            }
        } finally {
            stack = null;
        }
    }
608410
public function getEncryptionEnabledFields(\ReflectionClass $reflectionClass)
    {
        $encryptionEnabledFields = array();

        $classMetadata = $this->getEncryptionMetadataFor($reflectionClass->getName());

        if ($classMetadata->encryptionEnabled) {
            /** @var PropertyMetadata $propertyMetadata */
            foreach ($classMetadata->propertyMetadata as $propertyMetadata) {
                if ($propertyMetadata->encrypted) {
                    $reflectionProperty = $reflectionClass->getProperty($propertyMetadata->name);
                    $encryptionEnabledFields[$reflectionProperty->name] = $reflectionProperty;
                }
            }
        }

        return $encryptionEnabledFields;
    }
543885
private function getInjector(\ReflectionClass $reflection): InjectorInterface
    {
        if (isset($this->injectors[$reflection->getName()])) {
            //Stated directly
            $injector = $this->get($this->injectors[$reflection->getName()]);
        } else {
            //Auto-injection!
            $injector = $this->get($reflection->getConstant('INJECTOR'));
        }

        if (!$injector instanceof InjectorInterface) {
            throw new InjectionException(sprintf(
                "Class '%s' must be an instance of InjectorInterface for '%s'",
                get_class($injector),
                $reflection->getName()
            ));
        }

        return $injector;
    }
499333
@Override
    public void visitClassContext(ClassContext classContext) {
        // TODO: Look at method calls in a finally block to see if they throw
        // exceptions
        // : and those exceptions are not caught in the finally block
        // : Only do it if effort is on, ie: boolean fullAnalysis =
        // AnalysisContext.currentAnalysisContext().getBoolProperty(FindBugsAnalysisFeatures.INTERPROCEDURAL_ANALYSIS_OF_REFERENCED_CLASSES);

        try {
            int majorVersion = classContext.getJavaClass().getMajor();
            if (majorVersion >= Const.MAJOR_1_4) {
                fbInfo = new ArrayList<>();
                super.visitClassContext(classContext);
            }
        } finally {
            fbInfo = null;
        }
    }
1095899
@Override
    public void visitClassContext(ClassContext context) {
        try {
            JavaClass cls = context.getJavaClass();
            if (!cls.isEnum() && (cls.getMajor() >= Const.MAJOR_1_5)) {
                Method[] methods = cls.getMethods();
                for (Method m : methods) {
                    if (Values.CONSTRUCTOR.equals(m.getName()) && !m.isPrivate()) {
                        return;
                    }
                }
                firstEnumPC = 0;
                enumCount = 0;
                enumConstNames = new HashSet<String>(10);
                super.visitClassContext(context);
            }
        } finally {
            enumConstNames = null;
        }
    }
518373
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            isEnum = classContext.getJavaClass().isEnum();
            stack = new OpcodeStack();
            uninitializedRegs = new BitSet();
            arrayAliases = new HashMap<>();
            storedUVs = new HashMap<>();
            super.visitClassContext(classContext);
        } finally {
            stack = null;
            uninitializedRegs = null;
            arrayAliases = null;
            storedUVs = null;
        }
    }
127022
public function propertyContextFromReflection(\ReflectionProperty $property, $original)
    {
        $property->setAccessible(true);
        $context = new PropertyContext($property->name, $property->getValue($original), $property->class);

        return $this->parseAnnotations($context, $property, $original);
    }
1335325
@Override
    public void visitClassContext(final ClassContext classContext) {
        try {
            stack = new OpcodeStack();
            memberCollections = new HashMap<>();
            memberSourceLineAnnotations = new HashMap<>();
            super.visitClassContext(classContext);
        } finally {
            stack = null;
            memberCollections = null;
            memberSourceLineAnnotations = null;
        }
    }
445348
public function getFilters(\ReflectionClass $reflectionClass)
    {
        if ($this->isProduction()) {
            $this->grid->getFilter()->getFields();
        }

        $properties = $reflectionClass->getProperties(\ReflectionProperty::IS_PRIVATE | \ReflectionProperty::IS_PROTECTED);
        /** @var \ReflectionProperty $property */
        foreach ($properties as $property) {
            $propertyAnnotations = $this->extractorFactory->extract($property, Extractor::PROPERTY_ANNOTATION);
            foreach ($propertyAnnotations as $annotation) {
                if ($annotation instanceof Filter) {
                    $fields[] = $property->getName();
                }
            }
        }

        return !empty($fields) ? $fields : $this->grid->getFilter()->getFields();
    }
529367
@Override
    public void visitClassContext(ClassContext classContext) {
        if (mapInterface != null) {
            this.clsContext = classContext;
            classContext.getJavaClass().accept(this);
        }
    }
563982
protected function createDefinition(\ReflectionClass $reflection): Definition
    {
        $definition = new Definition($reflection->getName());

        foreach ($this->processors as $processor)
        {
            $processor->process($reflection, $definition);
        }

        $parent = $reflection->getParentClass();

        if ($parent !== false) {
            $definition->merge($this->createDefinition($parent));
        }

        foreach ($reflection->getTraits() as $trait)
        {
            $definition->merge($this->createDefinition($trait));
        }

        return $definition;
    }
318764
public function getClassEntryByClassName($className, CompilationContext $compilationContext, $check = true)
    {
        $this->compiler = $compilationContext->compiler;

        switch (strtolower($className)) {
            /*
             * Zend classes
             */
            case 'exception':
                $classEntry = 'zend_exception_get_default(TSRMLS_C)';
                break;

            /*
             * Zend interfaces (Zend/zend_interfaces.h)
             */
            case 'iterator':
                $classEntry = 'zend_ce_iterator';
                break;

            case 'arrayaccess':
                $classEntry = 'zend_ce_arrayaccess';
                break;

            case 'serializable':
                $classEntry = 'zend_ce_serializable';
                break;

            case 'iteratoraggregate':
                $classEntry = 'zend_ce_aggregate';
                break;

            /*
             * SPL Exceptions
             */
            case 'logicexception':
                $compilationContext->headersManager->add('ext/spl/spl_exceptions');
                $classEntry = 'spl_ce_LogicException';
                break;

            case 'badfunctioncallexception':
                $compilationContext->headersManager->add('ext/spl/spl_exceptions');
                $classEntry = 'spl_ce_BadFunctionCallException';
                break;

            case 'badmethodcallexception':
                $compilationContext->headersManager->add('ext/spl/spl_exceptions');
                $classEntry = 'spl_ce_BadMethodCallException';
                break;

            case 'domainexception':
                $compilationContext->headersManager->add('ext/spl/spl_exceptions');
                $classEntry = 'spl_ce_DomainException';
                break;

            case 'invalidargumentexception':
                $compilationContext->headersManager->add('ext/spl/spl_exceptions');
                $classEntry = 'spl_ce_InvalidArgumentException';
                break;

            case 'lengthexception':
                $compilationContext->headersManager->add('ext/spl/spl_exceptions');
                $classEntry = 'spl_ce_LengthException';
                break;

            case 'outofrangeexception':
                $compilationContext->headersManager->add('ext/spl/spl_exceptions');
                $classEntry = 'spl_ce_OutOfRangeException';
                break;

            case 'runtimeexception':
                $compilationContext->headersManager->add('ext/spl/spl_exceptions');
                $classEntry = 'spl_ce_RuntimeException';
                break;

            case 'outofboundsexception':
                $compilationContext->headersManager->add('ext/spl/spl_exceptions');
                $classEntry = 'spl_ce_OutOfBoundsException';
                break;

            case 'overflowexception':
                $compilationContext->headersManager->add('ext/spl/spl_exceptions');
                $classEntry = 'spl_ce_OverflowException';
                break;

            case 'rangeexception':
                $compilationContext->headersManager->add('ext/spl/spl_exceptions');
                $classEntry = 'spl_ce_RangeException';
                break;

            case 'underflowexception':
                $compilationContext->headersManager->add('ext/spl/spl_exceptions');
                $classEntry = 'spl_ce_UnderflowException';
                break;

            case 'unexpectedvalueexception':
                $compilationContext->headersManager->add('ext/spl/spl_exceptions');
                $classEntry = 'spl_ce_UnexpectedValueException';
                break;

            /*
             * SPL Iterators Interfaces (spl/spl_iterators.h)
             */
            case 'recursiveiterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_RecursiveIterator';
                break;

            case 'recursiveiteratoriterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_RecursiveIteratorIterator';
                break;

            case 'recursivetreeiterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_RecursiveTreeIterator';
                break;

            case 'filteriterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_FilterIterator';
                break;

            case 'recursivefilteriterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_RecursiveFilterIterator';
                break;

            case 'parentiterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_ParentIterator';
                break;

            case 'seekableiterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_SeekableIterator';
                break;

            case 'limititerator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_LimitIterator';
                break;

            case 'cachingiterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_CachingIterator';
                break;

            case 'recursivecachingiterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_RecursiveCachingIterator';
                break;

            case 'outeriterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_OuterIterator';
                break;

            case 'iteratoriterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_IteratorIterator';
                break;

            case 'norewinditerator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_NoRewindIterator';
                break;

            case 'infiniteiterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_InfiniteIterator';
                break;

            case 'emptyiterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_EmptyIterator';
                break;

            case 'appenditerator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_AppendIterator';
                break;

            case 'regexiterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_RegexIterator';
                break;

            case 'recursiveregexiterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_RecursiveRegexIterator';
                break;

            case 'directoryiterator':
                $compilationContext->headersManager->add('ext/spl/spl_directory');
                $classEntry = 'spl_ce_DirectoryIterator';
                break;

            case 'filesystemiterator':
                $compilationContext->headersManager->add('ext/spl/spl_directory');
                $classEntry = 'spl_ce_FilesystemIterator';
                break;

            case 'recursivedirectoryiterator':
                $compilationContext->headersManager->add('ext/spl/spl_directory');
                $classEntry = 'spl_ce_RecursiveDirectoryIterator';
                break;

            case 'globiterator':
                $compilationContext->headersManager->add('ext/spl/spl_directory');
                $classEntry = 'spl_ce_GlobIterator';
                break;

            case 'splfileobject':
                $compilationContext->headersManager->add('ext/spl/spl_directory');
                $classEntry = 'spl_ce_SplFileObject';
                break;

            case 'spltempfileobject':
                $compilationContext->headersManager->add('ext/spl/spl_directory');
                $classEntry = 'spl_ce_SplTempFileObject';
                break;

            case 'countable':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_Countable';
                break;

            case 'callbackfilteriterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_CallbackFilterIterator';
                break;

            case 'recursivecallbackfilteriterator':
                $compilationContext->headersManager->add('ext/spl/spl_iterators');
                $classEntry = 'spl_ce_RecursiveCallbackFilterIterator';
                break;

            case 'arrayobject':
                $compilationContext->headersManager->add('ext/spl/spl_array');
                $classEntry = 'spl_ce_ArrayObject';
                break;

            case 'splfixedarray':
                $compilationContext->headersManager->add('ext/spl/spl_fixedarray');
                $classEntry = 'spl_ce_SplFixedArray';
                break;

            case 'splpriorityqueue':
                $compilationContext->headersManager->add('ext/spl/spl_heap');
                $classEntry = 'spl_ce_SplPriorityQueue';
                break;

            case 'splfileinfo':
                $compilationContext->headersManager->add('ext/spl/spl_directory');
                $classEntry = 'spl_ce_SplFileInfo';
                break;

            case 'splheap':
                $compilationContext->headersManager->add('ext/spl/spl_heap');
                $classEntry = 'spl_ce_SplHeap';
                break;

            case 'splminheap':
                $compilationContext->headersManager->add('ext/spl/spl_heap');
                $classEntry = 'spl_ce_SplMinHeap';
                break;

            case 'splmaxheap':
                $compilationContext->headersManager->add('ext/spl/spl_heap');
                $classEntry = 'spl_ce_SplMaxHeap';
                break;

            case 'splstack':
                $compilationContext->headersManager->add('ext/spl/spl_dllist');
                $classEntry = 'spl_ce_SplStack';
                break;

            case 'splqueue':
                $compilationContext->headersManager->add('ext/spl/spl_dllist');
                $classEntry = 'spl_ce_SplQueue';
                break;

            case 'spldoublylinkedlist':
                $compilationContext->headersManager->add('ext/spl/spl_dllist');
                $classEntry = 'spl_ce_SplDoublyLinkedList';
                break;

            case 'stdclass':
                $classEntry = 'zend_standard_class_def';
                break;

            case 'closure':
                $compilationContext->headersManager->add('Zend/zend_closures');
                $classEntry = 'zend_ce_closure';
                break;

            case 'pdo':
                $compilationContext->headersManager->add('ext/pdo/php_pdo_driver');
                $classEntry = 'php_pdo_get_dbh_ce()';
                break;

            case 'pdostatement':
                $compilationContext->headersManager->add('kernel/main');
                $classEntry = $compilationContext->backend->fetchClassEntry('pdostatement');
                break;

            case 'pdoexception':
                $compilationContext->headersManager->add('ext/pdo/php_pdo_driver');
                $classEntry = 'php_pdo_get_exception()';
                break;

            case 'datetime':
                $compilationContext->headersManager->add('ext/date/php_date');
                $classEntry = 'php_date_get_date_ce()';
                break;

            case 'datetimezone':
                $compilationContext->headersManager->add('ext/date/php_date');
                $classEntry = 'php_date_get_timezone_ce()';
                break;

            // Reflection
            /*case 'reflector':
                $compilationContext->headersManager->add('ext/reflection/php_reflection');
                $classEntry = 'reflector_ptr';
                break;
            case 'reflectionexception':
                $compilationContext->headersManager->add('ext/reflection/php_reflection');
                $classEntry = 'reflection_exception_ptr';
                break;
            case 'reflection':
                $compilationContext->headersManager->add('ext/reflection/php_reflection');
                $classEntry = 'reflection_ptr';
                break;
            case 'reflectionfunctionabstract':
                $compilationContext->headersManager->add('ext/reflection/php_reflection');
                $classEntry = 'reflection_function_abstract_ptr';
                break;
            case 'reflectionfunction':
                $compilationContext->headersManager->add('ext/reflection/php_reflection');
                $classEntry = 'reflection_function_ptr';
                break;
            case 'reflectionparameter':
                $compilationContext->headersManager->add('ext/reflection/php_reflection');
                $classEntry = 'reflection_parameter_ptr';
                break;
            case 'reflectionclass':
                $compilationContext->headersManager->add('ext/reflection/php_reflection');
                $classEntry = 'reflection_class_ptr';
                break;
            case 'reflectionobject':
                $compilationContext->headersManager->add('ext/reflection/php_reflection');
                $classEntry = 'reflection_object_ptr';
                break;
            case 'reflectionmethod':
                $compilationContext->headersManager->add('ext/reflection/php_reflection');
                $classEntry = 'reflection_method_ptr';
                break;
            case 'reflectionproperty':
                $compilationContext->headersManager->add('ext/reflection/php_reflection');
                $classEntry = 'reflection_property_ptr';
                break;
            case 'reflectionextension':
                $compilationContext->headersManager->add('ext/reflection/php_reflection');
                $classEntry = 'reflection_extension_ptr';
                break;
            case 'reflectionzendextension':
                $compilationContext->headersManager->add('ext/reflection/php_reflection');
                $classEntry = 'reflection_zend_extension_ptr';
                break;*/

            default:
                if (!$check) {
                    throw new CompilerException('Unknown class entry for "'.$className.'"');
                } else {
                    $classEntry = $compilationContext->backend->fetchClassEntry(escape_class(strtolower($className)));
                }
        }

        return $classEntry;
    }
21050
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            if ((throwableClass != null) && !isPre14Class(classContext.getJavaClass())) {
                stack = new OpcodeStack();
                catchInfos = new HashSet<>();
                exReg = new HashMap<>();
                super.visitClassContext(classContext);
            }
        } finally {
            stack = null;
            catchInfos = null;
            exceptions = null;
            exReg = null;
        }
    }
1096028
public static function getPrivateProperty(\ReflectionClass $reflectionClass, $property)
    {
        if (!$reflectionClass->hasProperty($property) && $reflectionClass->getParentClass()) {
            return static::getPrivateProperty($reflectionClass->getParentClass(), $property);
        }

        return $reflectionClass->getProperty($property);
    }
598277
@Override
    public void visitClassContext(ClassContext classContext) {
        JavaClass cls = classContext.getJavaClass();
        clsVersion = cls.getMajor();
        super.visitClassContext(classContext);
    }