|
Consider the following simplified interface inheritence hierarchy:
// Starting point: public interface Base { void Foo(); } public interface Derived extends Base { }
It is intended to move the Foo method from the Base interface to the Derived interface...
Started by Daniel Fortunov on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I believe the difference between ....
Or am I way off base here?
I believe your requirement is valid, I have no doubt that overriding the deprecated method is the correct way to go.
Classes that implement the deprecated interface/function.
|
|
Does the Sun compiler have a notation to mark functions as deprecated, like GCC's __attribute__ ((deprecated)) or MSVC's __declspec(deprecated) ?
Started by Shmoopty on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
"test.cpp", line 15....
#define DEPRECATED char=function_is_deprecated() inline char function_is_deprecated() { return 65535; } void foo(int x, DEPRECATED) { } int main() { foo(3); return 0; }
The output:
CC -o test.
That yet.
|
|
In Java, if you import a deprecated class:
import SomeDeprecatedClass;
You get this warning: The type SomeDeprecatedClass is deprecated
Is there a way to suppress this warning?
Started by Ed Mazur on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
As a hack you can not do the import and us teh fully... .
Try using the following command-line switch when compiling:
-Xlint:-deprecation
the -Xlint switch lets you specify what warnings should be checked, prefacing one with a - explicitly disables it.
|
Ask your Facebook Friends
|
I know that xcopy is marked as deprecated, with Robocopy being its replacement.
Now I found that cacls is also deprecated, with Icacls as its replacement.
Are there more commands which are now deprecated? I could check them all manually but it's a long...
Started by WebDevHobo on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at superuser):
But you have to keep in mind that there is some feature .
The WINMAIL too ...
deprecated in Windows 7.
|
|
I'd like to mark a method as deprecated, so the people using it can easily check their code and catch up. In Java you set @Deprecated and everybody knows what this means.
So is there a preferred way (or even tools) to mark and check for deprecations in...
Started by blindgaenger on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Require 'lib/deprecated.rb| raise DeprecatedError.new....
You do have libdeprecated-ruby
A small library intended to aid developers working with deprecated as deprecated, and then allow/disallow the ability to execute deprecated code.
|
|
In Java 6 I can use a technique like this:
@Deprecated public final class Test { public static void main(String[] args) { System.out.println(Test.class.isAnnotationPresent(Deprecated.class)); } }
to decide if a type is deprecated. Is there any way at ...
Started by NellerLess on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
You can define your own:
public interface Deprecated { }
and make deprecated classes implement it.
The pre-Java5 way of indicating something is by using a marker interface .
It for the @deprecated tag, but this is not preferable.
|
|
Is there an annotation in .NET which allows methods or classes to be deprecated so that their use and their callers are identified by the compiler (cf @Deprecated in Java)
Started by peter.murray.rust on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You can add a comment on what people should be using, for example:
[Obsolete("Use NewMethod() instead")] public void OldMethod() { }
If you want to generate a compiler error when people use your method:
[Obsolete("Use NewMethod... .
The [Obsolete] attribute.
|
|
For Java programming, what are some benefits of using the @Deprecated notation on and interface method but not on the class that implements it?
public interface Joe { @Deprecated public void doSomething(); ... } public final class Joseph implements Joe...
Started by Mookie Wilson on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
If people code to an interface you can mark certain... .
In my opinion it is controversial : a deprecated method interface should not not be used regardless it's implementation (please provide counterexamples if not)
@Deprecated is documentation.
|
|
Does Eclipse have a feature that lets you search a project to find all calls to deprecated methods?
Started by John Topley on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Then, each use of a deprecated method or API....
Preferences, Java, Compiler, Errors/Warnings, Deprecated and restricted API section.
You can set the compiler to generate errors or warnings (your choice) for any usage of deprecated API.
|
|
Is use of underline deprecated and non validated?
Started by jitendra on
, 11 posts
by 11 people.
Answer Snippets (Read the full thread at stackoverflow):
The....
Note also that underlined text can be confusing;I like to <span class="underline">underline</span> words.</p>
Deprecated: yes/deprecated.html
Yes, it is deprecated.
Use styles instead.
Yes, it's deprecated.
|