How get method source code from a class
We developed a model generator tool that get a �base model� as an input and generated rich model.
The �base model� is collection of POJO classes and the model generator analyzed the base model (with reflection) and with �ftl� generates �rich model� , which is the base model with additional annotations and logics.
Some classes in the �base-model� may contain additional method and I need to copy those methods as they are to the �rich-model� generated sources.
I need a way to copy those methods from the base-model (I work on it with reflection, but I have also the source) to the rich-model.
I think to do this by decompile. Are there any better way?
Is there any simple utility that decompile method?
Thank you
There is a big differnet between the input and the output.
for example:
input:
@Key(indexs = { "name" })
@SuppressWarnings(value = { "serial", "unused" })
@Observers(observers = { @Observer(type = ObserverType.INSTANCE_INHERITANCE) })
public class Device extends Segment {
// ********************** Class Members: ********************** //
private DeviceTypeEnum type;
protected DeviceSetup deviceSetup;
protected Networking networking;output:
* model-project class. generated by ModelGenerator. *
@Entity
@Key(indexs={"name"})
@NamedQueries(value={@NamedQuery(name="Device.FilterByIndex", query="SELECT d FROM Device d WHERE d.name=:name")})
@Observers(observers={@Observer(type=ObserverType.INSTANCE_INHERITANCE)})
public class Device extends Segment implements ObservableIfc
private static final long serialVersionUID = -7782418163128836178L;
// ********************** Class Members: ********************** //
@Column(name="type_column")
@Type(type="com.radware.insite.modelhelpers.utils.GenericEnumUserType", parameters = {@Parameter(name = "enumClass" , value = "com.radware.insite.modelhelpers.constants.ImConstants$DeviceTypeEnum")})
private DeviceTypeEnum type;
private FieldMetadata typeMD = new RefMetadata();
@OneToOne(cascade={CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.REMOVE}, fetch=FetchType.LAZY)
@JoinColumn(name="dev_setup_2_dev")
protected DeviceSetup deviceSetup = new DeviceSetup();
private FieldMetadata deviceSetupMD = new RefMetadata();
Similar Messages
-
How can i get the source code from java concurrent program in R12
Hi 2 all,
How can i get the source code from java concurrent program in R12? like , "AP Turnover Report" is java concurrent program, i need to get its source code to know its logic. how can i get its source code not the XML template?
Regards,
Zulqarnainuser570667 wrote:
Hi 2 all,
How can i get the source code from java concurrent program in R12? like , "AP Turnover Report" is java concurrent program, i need to get its source code to know its logic. how can i get its source code not the XML template?
Regards,
ZulqarnainDid you see old threads for similar topic/discussion? -- https://forums.oracle.com/forums/search.jspa?threadID=&q=Java+AND+Concurrent+AND+Source+AND+Code&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
How do I get the java code from a class file ?
I want to know how to findout the java code from a .class file . Is there any utility or any way to get the java code from a .class file. If so , please let me know the step by step procedure .
Thanks
ShivaCheck out Mocha (http://www.brouhaha.com/~eric/computers/mocha.html)
It's free! -
How to migrate source code from TFS 2010 to a new TFS 2010
Hi,
Please help me, How to migrate source code from TFS 2010 to a new TFS 2010. we are using SQL 2008 R2 for DB storage and we have Backup of TFS DB. First TFS 2010 is live environment and second TFS 2010 is test environment both OS and SQL version is same.Hi Pankaj0439,
In general, to move TFS from a hardware to another, you can follow the steps as below:
1. Check your permissions
2. Back up databases and install software
3. Restore TFS databases to the new hardware
4. Update the configuration of the new application-tier server
5. Verify permissions, notify users, and configure backups
And you can also refer to this
article in MSDN for more details.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Where can I get the source code for sun classes?
Hello,
When ever you download sun's j2sdk, the archive always contains the source code for the entire sdk in a zip file called src.zip except the sun.xxx classes like sun.awt.print.PrintDialog or sun.awt.font.FontResolver.
For debugging purposes I need, if availabe, the source code of these classes which are not present in the src.zip.
Please can someone tell me if theses classes are available as source and can point me where I can find it cause I am searching for it but can't find it on the net.
Thank you
CarolinHey ChuckBing
And your way is the only way, right? No.What on earth is eating you? Highly sensitive today?
Where is the problem? There are two solutions of the question.
The one link I posted points directly to the sun source download link. The "readme" explains, yippie, the sun sources are contained. Easy, isn't it?
With the other one, you have to navigate at least through two other pages before you might find the link and only if you recognize that "Download JDK 5.0 source via SCSL/JRL" means the sun source code and not the sources contained in the JDK download. This is what I thought as I've seen this link the first time. Unfortunately there is no "readme".
I prefer the easy way, I dont want to earn a doctorate. Ok, you can say dont "play the woman", but I'm a woman and a blonde too;-)
But, let us stop the idle discussion here, please!
Nevertheless, thanks to you and [email protected] for answering. -
How to hide the source code from the .class file
Hi,
By some jad tool we can recompile the .class files and get the java file corresponding to it. How to protect it?
Anyone please help me..
Thanks & Regards,
N.RavasankarAn obfuscator can for example rename classes, variables to meaningless names, like one-letter names. And it can make some bytecode that is hard to decompile or just makes the code less readable when decompiled. Some obfuscators might even be able to do something to the code that makes decompilers not work or incorrect decompile code.
-
How to treat source code from a website.
I've been Googling a lot and reading one of my Applescript's tutorials, but nothing. I want to pick every link in a website, but the script fails from the beginning:
set codi_font to the source of the front document as text
When I paste this in a Textedit document or i display it, is empty.
Where the BIG fail is?Here, the following code seems to work perfectly well:
tell application "Safari" to set codi_font to the source of the front document as text
tell application "TextEdit"
launch
make new document at front
set text of front document to codi_font
activate
end tell
Message was edited by: Pierre L. -
How to get source code from portal app
Hi,
I have a successful Web dynpro portal application running, which I would like to modify. We lost the source code. Is there any way that I can get the source code from the portal?.
Thanks and I appreciate your help.
/Sunita.Hi,
You can extract class files from app.jar and decompile it(.ear->.wda) but it is only generated classes without metadata. Metadata is stored in .wda file but format is not compatible with studio. That all options you have.
Go through the following links, it will be helpfull to you
Some of the solutions provided in it
[Re: Retrieve the source code from .EAR;
[Restore source code from ear file;
Regards
Raghu -
Hi, I am trying to get the source code from within my secure bank site. I can get invoke nodes and property nodes to login automatically to my bank site but thats where I fail. I can not then get the source code of my watch screens. Is there a way I can use a ihtmldocument2 property node to gather the source code of frames within this secure site?
I've attached a piece of code I've been playing with that sucessfully logs into my account, but thats where it ends. I can go to the page source in my browser and see what I want but cant get labview to gather it. None of the forum topics cover this to my knowledge. Any help would be great.
Regards
Attachments:
autologin_and_pagescrape.vi 49 KBSniepsy,
I think the following two links will be very useful for you:
http://forums.ni.com/ni/board/message?board.id=170&message.id=145896&requireLogin=False
http://forums.ni.com/ni/board/message?board.id=170&message.id=159554&requireLogin=False
Hope that helps!
Kalin T
Applications Engineer
National Instruments
Kalin T.
National Instruments -
How to get the HTML Source code from the active browser ?
Hi All,
I need to get the HTML Source code from the active browser (IE). I tried with the below code, but I am not able to get the Source code all the time, with respect to the different applications (http or https) and the user authentication has to be changes in few applications (_I dont know or not able to given that in the below code_). More over there is also a dependence of the URL to get the HTML Source code.
Therefore what I feel is getting the HTML Source code from the given or active browser will be consistent than the URL. Since the Source code is available in the browser (IE) . Please help me with a sample code to achieve this . . . !
HTMLDocument doc=(HTMLDocument) kit.createDefaultDocument();
doc.putProperty("IgnoreCharsetDirective", Boolean.TRUE);
URL url = new URL(strURL);
Reader HTMLReader = new InputStreamReader(url.openConnection().getInputStream());
kit.read(HTMLReader, doc, 0);Thanks in advance,
Regards,
Jothi Venkatachalam
Edited by: j0o on May 7, 2009 3:11 AMThe simple answer is: you don't.
Not only is it simply not possible, but the entire concept of "the active browser" doesn't exist.
You were on the right track with your code to retrieve the page directly from the server, but as you noticed that code will only work for regular http connections.
For https and other protocols you will need to use appropriate libraries for each protocol. Something like Apache Commons can help you with that. There are networking libraries in there for a lot of commonly used protocols. -
How to get the source code of a PRT application in the portal
Hi!
Does anybody know how to get the source code of a PRT application in the portal?
Thanks in advance,
CelsoCelso,
If its Java-based code have a look at the properties of an iView that belongs to the application in question and copy the value of the Code Link parameter e.g. 'com.sap.pct.hcm.rc_vacancyrequestov.default'.
Search the Portal installation directory under /j233/cluster/server/ for a .par.bak file of the same name, removing .default from the codelink parameter
e.g. com.sap.pct.hcm.rc_vacancyrequestov.par.bak
Copt this locally and import into Netweaver Developer Studio. You will have to decompilte the class files with a decompiler such as DJ Decompiler or Cavaj (search with Google).
Cheers,
Steve -
How to get the source code of Java Concurrent Program?
Hi,
How to get the source code of Java Concurrent Program?
Example
Programe Name:Format Payment Instructions
Executable:Format Payment Instructions
Execution File Name:FDExtractAndFormatting
Execution File Path:oracle.apps.iby.scheduler
Thanks in advance,
SenthilGo on Unix box at $JAVA_TOP/oracle/apps/iby/scheduler
You will get class file FDExtractAndFormatting.
Decompile it to get source code.
Thanks, Avaneesh -
How to get the source code of an HTML page in Text file Through J2EE
How to get the source code of an HTML page in Text file Through J2EE?
Huh? If you want something like your browser's "view source" command, simply use a URLConnection and read in the data from the URL in question. If the HTML page is instead locally on your machine, use a FileInputStream. There's no magic invovled either way.
- Saish -
Where to find the pcui_gp components ,How to get the source code of those
Hi All,
Can anybody tell the exact location wher the pcui_gp components will be stored if they are not appearing.
And another question is how to get the source code of the pcui_gp for customization.
anybody working on these compoents please help me.
answers will be rewarded.
thanks and regards,
anandHi Arun,
I am unable to see the pcui_gp components in the DTR ,I require this in order to get the source code of one of its component.
Can you please tell me the step by step procedure getting those pcui_gp components from J2ee engine to the dtr or NWDI.
If there are any documents on pcui_gp components exclusively please do forward to my mail id [email protected]
Thansk and Regards,
Anand. -
How will get the source code of all the tables in a given schema using SQL?
Hi All,
How can we get the source code of all the tables in a given schema using SQL?
Thanks in Adv.
JunuTry something like...
set heading off
set pagesize 0
col meta_data for a96 word_wrapped
set long 100000
SELECT DBMS_METADATA.GET_DDL(object_type, object_name, owner) ||';' AS meta_data
FROM dba_objects
WHERE owner = '<SCHEMA NAME>'
AND object_type not in (<list of stuff you do not want>);
Maybe you are looking for
-
I hate to add yet another post on the horrors of iPhoto 9.2.1, but after spending an hour reading everyone else's (and trying a variety of suggested fixes) nothing has worked and my situation seems unique so I thought I'd ask... After being prompted
-
My hp v210(4gb) pen drive is not detected in my pc but it show its properties in my pc
my hp pen drive was not detected in my pc . my os window 7 64 bit but it show properties of the pendrive
-
Airport card for powerbook G4 12" Aluminum
I have a powerbook G4 12" aluminum and I have looked everywhere for an airport card. I have gotten two original airport cards and they did not fit,these cards are just a smidge too wide for the card slot. I know there is an apple card that will fit i
-
I cannot seem to find where you switch between the video modes on the new MacBook (2008 Al). Any help would be appreciated. Thanks Ivan
-
System error in routine FI_TAX_CHK_PRICING_DATA error code 13
hi i m new in sap.when i try posting in gl i got the following error messege system error in routine FI_TAX_CHK_PRICING_DATA error code 13 function builder tax2 can some one help me out