A passage in Java programming thought:When writing a Java source code file, this file is often referred to as a compilation unit (sometimes referred to as a translation unit). Each compilation unit must have a suffix name. java, and within the
PHP gets, checks the class name, function name, method name function method
This article mainly introduces the PHP acquisition, check the class name, function name, method name of the function method, this article summarizes the function of 7
The advantage of the Objective-c language is that we are more flexible when writing code, such as we can forward the message to the object we want, or swap the implementation of a method at random. This feature means that objective-c requires not
We know that although JavaScript is an object-based (object-based) language. But using its prototype (prototype) feature, we can fully implement the very sexy OO framework, which can be seen in the Classic forum article ' essentially JavaScript OOP (
New Person classSubclass of Person StudentTeacherToday I think of the database encapsulation, because the query results are inherited from Nsmanagerobject, but his sub-class properties are not necessarily the same, so I think I can not judge after
Below I present you and different ways to get the current Class:
Using Thread
Using GetClass ()
The simplest-to-get the name of the class where your code is being executed in are using the getClass() method present in Ev Ery Java
One: Structure and invocation (instantiation):
Class classname{}, calling: $obj = new ClassName (), and when the class has a constructor, it should also pass in the argument. such as $obj = new ClassName ($v, $v 2 ...);
Two: Constructors and
1. When you use this in an inner class to refer to an object of the inner class, you can use the outer class name to access the Outer class object.2, in Java, each class has a corresponding class object, when a class is written, after compiling, in
As we all know, in the C language, we can FILE get the __LINE__ file name and line number through the macro, in the Java language, you can StackTraceElement get the file name, class name, method name, line number from the class, the code is as
The wood has the title to say so simple!!
The problem is:
Class A in PHP Inherits Class B, and how to get classes name of Class B in Class A
The actual conditions of use are:
Class B is a base class, multiple classes a,c,d ..... Need to inherit
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.